tensorflow 报错

安装tensorflow 警告信息

numpy 版本改为1.15.4

1
2
3
4
5
6
7
8
9
10
11
12
13
import tensorflow as tf
~/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: 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_qint8 = np.dtype([("qint8", np.int8, 1)])
~/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: 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)])
~/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: 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_qint16 = np.dtype([("qint16", np.int16, 1)])
~/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: 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_quint16 = np.dtype([("quint16", np.uint16, 1)])
~/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: 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_qint32 = np.dtype([("qint32", np.int32, 1)])
~/.local/lib/python3.7/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'.
np_resource = np.dtype([("resource", np.ubyte, 1)])

网址:https://github.com/tensorflow/tensorflow/issues/31249

核心已转储:(Segmentation fault(core dumped))

core 线圈,代表内存

下标越界,访问了不可访问或不存在的内容

linux下应用 ulimit -a 命令查看当前栈空间大小

ulimit -s 102400 将栈的大小改为100M

或者 ~/.bashrc
~/.bashrc 的最后加入: ulimit -c unlimited (一劳永逸)
ulimit -s unlimited

https://www.xuebuyuan.com/3235632.html
https://blog.csdn.net/qq_39759656/article/details/82858101

python 安装 https://askubuntu.com/questions/175412/how-can-i-get-python-stack-trace-information-using-gdb
python gdb https://wiki.python.org/moin/DebuggingWithGdb

坚持原创技术分享,您的支持将鼓励我继续创作!