"TensorLayer does not support Tensorflow version older than 2.0.0.\n"

今天在运行程序的时候,出现了下面的错误:

/Users/admin/anaconda3/envs/defocus/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:535: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
  File "main.py", line 2, in <module>
    from utils import *
  File "/Users/admin/Documents/项目/散焦估计/DMENet/utils.py", line 2, in <module>
    import tensorlayer as tl
  File "/Users/admin/anaconda3/envs/defocus/lib/python3.6/site-packages/tensorlayer/__init__.py", line 27, in <module>
    "TensorLayer does not support Tensorflow version older than 2.0.0.\n"
RuntimeError: TensorLayer does not support Tensorflow version older than 2.0.0.
Please update Tensorflow with:
 - `pip install --upgrade tensorflow`
 - `pip install --upgrade tensorflow-gpu`

解决方法

 pip install Tensorlayer==1.11.1

把tensorlayer降降级就行了。

参考文献

[1]. "TensorLayer does not support Tensorflow version older than 2.0.0. https://github.com/tensorlayer/openpose-plus/issues/203

猜你喜欢

转载自blog.csdn.net/w5688414/article/details/105080310