问题1:Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
解决:代码中添加
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
问题2:Tensorflow GPU显存占满,而Util为0
解决:代码中添加
import os
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = "8" //这里指定GPU8
代码中同时指定了GPU,避免了其他GPU的显存占用。
参考文章:https://blog.csdn.net/qq_24306353/article/details/79952266