Python3 import tensorflow appear FutureWarning: Passing (type, 1) or '1type' problem

FutureWarning when solving python call TensorFlow: Passing (type, 1) or '1type' as a synonym of type is deprecate

Disclaimer: This article is a blogger original article, follow the  CC 4.0 BY-SA  copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/BigDream123/article/details/99467316

Face recognition recently because to do a project based on the depth of learning, to use TensorFlow, but the download is complete after the discovery of import tensorflow always appear 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_quint8 = np.dtype ([( "quint8", np.uint8, 1)]) of error, as

Baidu, which many say is a version numpy wrong, for a version of numpy on the line, but I changed several versions useless, is still being given, and finally found, you can use the Import tensorflow in pycharm, and then click-through occurs warning into dtype.py, modify the code of the corresponding row, the np.dtype ([( "quint8", np.uint8, 1)]) is modified np.dtype ([( "quint8", np.uint8, ( 1))]) on the perfect solution, as

change into

 

Finally, Posted on: 2019-08-13 19:51:37
There are  0 individuals a reward
Private letter seeking help

Python3 import tensorflow appear FutureWarning: Passing (type, 1) or '1type' problem

numpy downgrade on it, import numpy as np -> print (np .__ version__), I was tf-1.14.0, np-1.17.1, np will be changed to pip install numpy == 1.16.0

 

Guess you like

Origin www.cnblogs.com/php-linux/p/11941242.html