tensorflow GPU显存占满而Util为0的问题

时间:2024-11-07 16:07:53

问题1:Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA

 解决:代码中添加

import os
['TF_CPP_MIN_LOG_LEVEL'] = '2'

问题2:Tensorflow GPU显存占满,而Util为0

解决:代码中添加

import os
["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
["CUDA_VISIBLE_DEVICES"] = "8" //这里指定GPU8

代码中同时指定了GPU,避免了其他GPU的显存占用。

参考文章:/qq_24306353/article/details/79952266