Skip to content
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

Hatt error #18

Closed
978749951 opened this issue Sep 21, 2017 · 1 comment
Closed

Hatt error #18

978749951 opened this issue Sep 21, 2017 · 1 comment

Comments

@978749951
Copy link

Training is fine. however I got a error after training, I don't know how to solve it. Anyone could share me a hand?
Epoch 10/10
21054/21054 [==============================] - 257s - loss: 0.3286 - acc: 0.8863 - val_loss: 0.3596 - val_acc: 0.8643

Traceback (most recent call last):
File "Hatt_modify.py", line 231, in
l_dense_sent = TimeDistributed(Dense(200))(l_lstm_sent)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 586, in call
self.assert_input_compatibility(inputs)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 457, in assert_input_compatibility
str(K.ndim(x)))
ValueError: Input 0 is incompatible with layer time_distributed_4: expected ndim=3, found ndim=4

@978749951
Copy link
Author

I have solved it. The reason why the error occurs was that the program should run in Keras 1.X instead of keras 2.x. If you encounter the similar problems, you can refer to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant