【发布时间】:2016-11-22 07:44:21
【问题描述】:
当使用 Theano 作为后端运行 Keras 实现时。我收到以下错误消息,我真的不知道可能的原因。如果您遇到此类问题,或者能够分享任何见解,我将不胜感激。
在下面,我用深黑色标记了两条线。第一行与导致问题的代码有关。底部的第二条深黑色线看起来像错误消息。
使用以下命令行编译时出现问题: /usr/bin/g++ -shared -g -O3 -fno-math-errno -Wno-unused-label -Wno-unused-variable -Wno-write-strings -march=core2 -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx 跳过一些细节......
Traceback (most recent call last):
File "train.py", line 144, in <module>
train_and_predict()
File "train.py", line 129, in train_and_predict
model.fit(imgs_train, imgs_mask_train, batch_size=32, nb_epoch=20, verbose=1, shuffle=True,callbacks=[model_checkpoint])
File "/user/theano/lib/python3.4/site-packages/Keras-1.0.3-py3.4.egg/keras/engine/training.py", line 1037, in fit
self._make_train_function()
File "/user/theano/lib/python3.4/site-packages/Keras-1.0.3-py3.4.egg/keras/engine/training.py", line 670, in _make_train_function
**self._function_kwargs)
File "/user/theano/lib/python3.4/site-packages/Keras-1.0.3-py3.4.egg/keras/backend/theano_backend.py", line 528, in function
return Function(inputs, outputs, updates=updates, **kwargs)
File "/user/theano/lib/python3.4/site-packages/Keras-1.0.3-py3.4.egg/keras/backend/theano_backend.py", line 514, in __init__
**kwargs)
....跳过一些细节...
File "/user/theano/lib/python3.4/site-packages/Theano-0.8.2-py3.4.egg/theano/gof/cmodule.py", line 1142, in module_from_key
module = lnk.compile_cmodule(location)
File "/user/theano/lib/python3.4/site-packages/Theano-0.8.2-py3.4.egg/theano/gof/cc.py", line 1506, in compile_cmodule
preargs=preargs)
File "/user/theano/lib/python3.4/site-packages/Theano-0.8.2-py3.4.egg/theano/gof/cmodule.py", line 2183, in compile_str
compile_stderr = decode(p_out[1])
File "/user/theano/lib/python3.4/site-packages/Theano-0.8.2-py3.4.egg/theano/compat/__init__.py", line 42, in decode
return x.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 0: invalid start byte
【问题讨论】:
-
不要给出整个错误日志,它会降低帖子的可读性。如果您可以根据您的要求突出显示导致错误的主要因素,那很好。
-
感谢您的建议,我已经修改了原帖