您好,欢迎来到世旅网。
搜索
您的当前位置:首页Python报错:AttributeError: ‘Tensor‘ object has no attribute ‘numpy‘

Python报错:AttributeError: ‘Tensor‘ object has no attribute ‘numpy‘

来源:世旅网

Python报错:
Traceback (most recent call last):
File “code_09_mydataset.py”, line 138, in
img = Image.fromarray(np.uint8(i.numpy()))
AttributeError: ‘Tensor’ object has no attribute ‘numpy’

参考文献:

解决方案:
代码最前加

tf.enable_eager_execution()

方法源于:
https://www.tensorflowers.cn/t/6896

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- esig.cn 版权所有

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务