例如Keras / Theano的表现:损失:nan - acc:0

时间:2016-09-06 16:52:43

标签: python deep-learning theano keras

我使用了此示例中的相同代码 https://github.com/fchollet/keras/blob/master/examples/imdb_cnn.py

但结果非常糟糕:损失:非 - acc:0

Using Theano backend.
DEBUG: nvcc STDOUT mod.cu
Creating library D:/Users/lenovo/AppData/Local/Theano/compiledir_Windows-8.1-6.3.9600-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.12-64/tmpccono5/265abc51f7c376c224983485238ff1a5.lib and object D:/Users/lenovo/AppData/Local/Theano/compiledir_Windows-8.1-6.3.9600-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.12-64/tmpccono5/265abc51f7c376c224983485238ff1a5.exp

Using gpu device 0: GeForce GTX 860M (CNMeM is enabled with initial size: 70.0% of memory, cuDNN 5005)
Loading data...
25000 train sequences
25000 test sequences
Pad sequences (samples x time)
X_train shape: (25000L, 400L)
X_test shape: (25000L, 400L)
Build model...
Train on 25000 samples, validate on 25000 samples
Epoch 1/2
25000/25000 [==============================] - 23s - loss: nan - acc: 7.2000e-04 - val_loss: nan - val_acc: 0.0000e+00
Epoch 2/2
25000/25000 [==============================] - 23s - loss: nan - acc: 0.0000e+00 - val_loss: nan - val_acc: 0.0000e+00

Process finished with exit code 0

任何人都可以帮我弄清楚如何解决这个问题?谢谢!

0 个答案:

没有答案