Tensorflow-gpu训练卷积时报出错误,虽然可以启动但无法训练
环境
pycharm
+tensorflow-gpu2.4.0
+python3.8
+cuda11.1
报错
非常恼火!!!!!!!!!!!
Errors may have originated from an input operation.
Input Source operations connected to node Conv2D:
tensorflow2.X与tensorflow1.X不同
加上以下三行代码,解决问题
config = tf.compat.v1.ConfigProto()
config.gpu_options.allow_growth = True
sess = tf.compat.v1.Session(config=config)