envs==tensorflow2
tf-gpu==2.3.0 python==3.8
运行过程报错及调试修正
1.报错:源代码是tfv1版本,出现了代码不对应问题
调试:improt部分import tensorflow as tf改为import tensorflow.compat.v1 as tf
import tensorflow.compat.v1 as tf
tf.compat.v1.disable_eager_execution() # 为了解决一个报错问题 但本人不小心忘记
import numpy as np
import cv2
2.报错:NotImplementedError: Cannot convert a symbolic Tensor (sequential/simple_rnn/strided_slice:0) to a numpy array. This error may indicate that you’re trying to pass a Tensor to a NumPy call, which is not supported
调试:经过查证认为原因是tensorflow和numpy版本不兼容的问题,将numpy从1.22.x降到1.19.5的版本