今天在運行程序的時候,出現了下面的錯誤:
/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