-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
运行cnn.py时报错 #15
Comments
这份代码的backend使用的是theano,最新版keras默认后端tf。检查一下 |
感谢,楼主的回答。程序是在后端为theano的情况下运行的。 |
C盘下找
|
十分感谢楼主的解答。问题集解决,但是程序运行到model.fit(), python.exe 停止运行。初接触keras,还请楼主指点指点。谢谢。 |
我在centos 7.2 python 2.7环境执行,报以下错误,楼主之前使用的具体环境和模块版本是否可以提供一下。 |
Hey @oyb001 , From your description, some comments, but not necessarily useful, I guess your python cannot find the package route correctly: for windows: for MAC checkout this link for why use '/usr/bin/env' beforehand: http://www.junlulocky.com/blog/pythontricks |
oops, please remove 'name' before _fblas. |
@junlulocky ,python里面没有_fblas这边包 [root@sz-xh_42f-op-test-cmdb-kafka ~]# |
@junlulocky ,问题已解决, 本人安装环境: |
Traceback (most recent call last):
File "", line 1, in
debugfile('H:/DeepLearning/cnn_minst_keras/cnn.py', wdir='H:/DeepLearning/cnn_minst_keras')
File "D:\Anaconda2\lib\site-packages\spyder\utils\site\sitecustomize.py", line 888, in debugfile
debugger.run("runfile(%r, args=%r, wdir=%r)" % (filename, args, wdir))
File "D:\Anaconda2\lib\bdb.py", line 400, in run
exec cmd in globals, locals
File "", line 1, in
File "D:\Anaconda2\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile
execfile(filename, namespace)
File "D:\Anaconda2\lib\site-packages\spyder\utils\site\sitecustomize.py", line 87, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)
File "h:/deeplearning/cnn_minst_keras/cnn.py", line 9, in
'''
File "D:\Anaconda2\lib\site-packages\keras\models.py", line 308, in add
output_tensor = layer(self.outputs[0])
File "D:\Anaconda2\lib\site-packages\keras\engine\topology.py", line 487, in call
self.build(input_shapes[0])
File "D:\Anaconda2\lib\site-packages\keras\layers\core.py", line 695, in build
name='{}_W'.format(self.name))
File "D:\Anaconda2\lib\site-packages\keras\initializations.py", line 36, in normal
return K.random_normal_variable(shape, 0.0, scale, name=name)
File "D:\Anaconda2\lib\site-packages\keras\backend\theano_backend.py", line 145, in random_normal_variable
return variable(np.random.normal(loc=0.0, scale=scale, size=shape),
File "mtrand.pyx", line 1903, in mtrand.RandomState.normal (numpy\random\mtrand\mtrand.c:18479)
File "mtrand.pyx", line 234, in mtrand.cont2_array_sc (numpy\random\mtrand\mtrand.c:3092)
ValueError: negative dimensions are not allowed
The text was updated successfully, but these errors were encountered: