FutureWarning: Passing (type, 1) or ‘1type‘ it will be understood as (type, (1,)) / ‘(1,)type‘
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'.
目录
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'.
问题:
解决:
完整错误:
启示:
如果对应的错误日志在百度和bing都没有找到满意的结果,快速找google不要犹豫,犹豫就会浪费时间,时间宝贵不用我教你;
如果条件允许,自己搞个梯子,这样就可以使用google查找错误日志,事半功倍;
如果条件不允许,自己去找一些免费的梯子,速度慢一点也能用,毕竟是免费的不要太苛刻;
问题:
pyinstaller --clean --onefile LSTM_prediction.py
pyinstaller打包执行lstm程序(基于tensorflow 1.14版本编写)
解决:
#许多网上的资料推荐使用如下方法,不过没有解决笔者的问题;
1. pip uninstall numpy
2. pip install numpy==1.16.4
#
在jupyter中运行原始程序发现如下日志:
D:\anaconda\lib\site-packages\tensorflow\python\framework\dtypes.py:525: 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)])
D:\anaconda\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: 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'.
那么笔者找到对应目录进行修改:
将1改为:(1,)
#原始
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
_np_qint32 = np.dtype([("qint32", np.int32, 1)])# _np_bfloat16 is defined by a module import.# Custom struct dtype for directly-fed ResourceHandles of supported type(s).
np_resource = np.dtype([("resource", np.ubyte, 1)])
#修改后:
_np_qint8 = np.dtype([("qint8", np.int8, (1,))])
_np_quint8 = np.dtype([("quint8", np.uint8, (1,))])
_np_qint16 = np.dtype([("qint16", np.int16, (1,))])
_np_quint16 = np.dtype([("quint16", np.uint16, (1,))])
_np_qint32 = np.dtype([("qint32", np.int32, (1,))])# _np_bfloat16 is defined by a module import.# Custom struct dtype for directly-fed ResourceHandles of supported type(s).
np_resource = np.dtype([("resource", np.ubyte, (1,))])
完整错误:
d; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
C:\Users\LIGUAN~1\AppData\Local\Temp\_MEI178882\tensorflow\python\framework\dtypes.py:518: 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'.
C:\Users\LIGUAN~1\AppData\Local\Temp\_MEI178882\tensorflow\python\framework\dtypes.py:519: 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'.
C:\Users\LIGUAN~1\AppData\Local\Temp\_MEI178882\tensorflow\python\framework\dtypes.py:520: 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'.
C:\Users\LIGUAN~1\AppData\Local\Temp\_MEI178882\tensorflow\python\framework\dtypes.py:525: 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'.
......
............................
d; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
C:\Users\LIGUAN~1\AppData\Local\Temp\_MEI287642\tensorflow\python\framework\dtypes.py:525: 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'.
Traceback (most recent call last):
File "LSTM-Test.py", line 35, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "D:\anaconda\envs\deploy_test\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\python\autograph\__init__.py", line 37, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "D:\anaconda\envs\deploy_test\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\python\autograph\core\converter.py", line 71, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "D:\anaconda\envs\deploy_test\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\python\autograph\pyct\cfg.py", line 41, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "D:\anaconda\envs\deploy_test\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\python\autograph\pyct\compiler.py", line 32, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "D:\anaconda\envs\deploy_test\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\astor\__init__.py", line 24, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\x~1\\AppData\\Local\\Temp\\_MEI253042\\astor\\VERSION'
[26340] Failed to execute script LSTM
参考:No such file or directory error using pyinstaller and scrapy
参考:"synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'." problem in TensorFlow
FutureWarning: Passing (type, 1) or ‘1type‘ it will be understood as (type, (1,)) / ‘(1,)type‘相关推荐
- 运行tensorflow代码出现dtypes.py:516: FutureWarning: Passing (type, 1) or '1type的解决方法(亲测)
使用tensorflow写的深度学习模型,在服务器上跑模型时老是弹出/anaconda3/envs/tf/lib/python3.5/site-packages/tensorflow/python/f ...
- 解决python调用TensorFlow时出现FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecate
最近因为要做一个基于深度学习的人脸识别项目,要用到TensorFlow,但是下载完成后后发现import tensorflow总是出现FutureWarning: Passing (type, 1) ...
- TensorFlow报错FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated......(亲测)
使用TensorFlow时报错FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a ...
- 运行keras出现 FutureWarning: Passing (type, 1) or ‘1type‘ as a synonym of type is deprecated解决办法
运行keras出现 FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a futur ...
- python调用TensorFlow时报错:FutureWarning: Passing (type, 1) or ‘1type‘ as a synonym of type is deprecated
问题: 使用Tensorflow时报错: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; ...
- FutureWarning: Passing (type 1) or 1type as a synonym of type is deprecated in a future vers 的解决
使用tensorflow时遇到以下警告信息,虽然不影响使用,但是看着不爽.具体解决办法如下. 警告信息: FutureWarning: Passing (type, 1) or '1type' as ...
- dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a
dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a ...
- Python:设置不显示Using TensorFlow backend及FutureWarning: Passing (type, 1) or ‘1type‘ as a synonym of typ
Python:设置不显示Using TensorFlow backend及FutureWarning: Passing type, 1 or '1type' as a synonym of type ...
- anaconda调用TensorFlow出现dtypes.py:526: FutureWarning: Passing (type, 1) or ‘1type‘ as a synonym of typ
在anaconda prompt调用TensorFlow,出现D:\anaconda\lib\site-packages\tensorflow\python\framework\dtypes.py: ...
最新文章
- 一行代码太长的解决方法
- 三点到六点是几个小时_环卫工在10吨垃圾里找了6小时,终于找到这张价值19万元的餐巾纸...
- Eclipse编程快捷键
- jspspy database help
- mybatis mysql 方言_mybatis-MyBatits执行效率问题
- python 谷歌翻译 api_python免费调用谷歌翻译接口
- 【T3】将“恢复记账前状态”按钮放置到工作台,一直显示。
- windows server backup功能
- 基础算法-生兔子(JAVA)
- 本文将要讨论Objective-C中的方法替换(method replacement)和swizzling(移魂大法)。
- Graham Scan算法
- 名字空间的含义及作用
- worksheet怎么读_worksheet是什么意思_worksheet的翻译_音标_读音_用法_例句_爱词霸在线词典...
- 2 Sets HDD200 Drilling Mud Recycling System for CPP
- 《GTA5》游戏拆解分析
- UML2.0包含的14种图
- NanoPi NEO小试牛刀(二)
- 读懂老板的暗语,你需要知道解释器模式~
- R语言/Python 将地址标记在地图上
- RIKIBOT-FX4多线激光雷达与LIO-SAM算法构建三维地图