AttributeError: ‘tensorflow.python.framework.ops.EagerTensor’ object has no attribute ‘reshape’
报错代码
img = img.reshape(512, 512, 3)
报错信息
AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has no attribute 'reshape'
解决办法
img = np.array(img).reshape(512, 512, 3)
np转arr