当前位置: 代码迷 >> 综合 >> UnknownError:Fail to find the dnn implementation解决方法
  详细解决方案

UnknownError:Fail to find the dnn implementation解决方法

热度:79   发布时间:2023-10-26 19:55:21.0

程序加上下面代码

gpus = tf.config.experimental.list_physical_devices('GPU')
if not gpus:return "No GPU available"
try:# Currently, memory growth needs to be the same across GPUsfor gpu in gpus:tf.config.experimental.set_memory_growth(gpu, True)logical_gpus = tf.config.experimental.list_logical_devices('GPU')print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")
except RuntimeError as e:print(e)
  相关解决方案