tensorflow2.0报错:Function call stack:distributed_function

在原程序的import后添加如下代码并restart即可:

physical_devices = tf.config.experimental.list_physical_devices('GPU')
assert len(physical_devices) > 0, "Not enough GPU hardware devices available"
tf.config.experimental.set_memory_growth(physical_devices[0], True)
原创文章 46 获赞 49 访问量 2198

猜你喜欢

转载自blog.csdn.net/qq_41660119/article/details/105749759
今日推荐