小编ab1*_*123的帖子

非法指令:运行任何 Tensorflow 程序时出现 4 错误

我正在尝试训练一个 Tensorflow 卷积神经网络,无论我运行程序的环境如何,我总是遇到一个神秘的错误。

在 Jupyter Notebook 中,内核会死掉。

在终端中,我得到“非法指令:4”而没有回溯。

在 Pycharm 中,我得到:“进程已完成,退出代码为 132(被信号 4:SIGILL 中断)”。

我查看了整个互联网,但没有发现在这种情况下抛出此特定错误的任何实例。如果有人可以帮助阐明此错误,我将不胜感激。

我正在使用 Mac OS X High Sierra 和 python 3.6.2

我的代码可以在下面找到,正如我之前所说,没有回溯。

import tensorflow as tf
import numpy as np
import pandas as pd

# OS to load files and save checkpoints
import os

image_height = 60
image_width = 1

image1_height = 15
image2_width = 1
model_name = "tensorflowCNN"

train_data = np.asarray(pd.read_csv("/home/student/Desktop/TrainingInput.csv", usecols=[1]))
lis = train_data.tolist()
lis = lis[0:60]
lis = [x[0].strip('[]\n,') for x in lis]
nlis …
Run Code Online (Sandbox Code Playgroud)

python pycharm conv-neural-network tensorflow jupyter-notebook

2
推荐指数
1
解决办法
2859
查看次数