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

recurrentcontainer_2 shape mismatch #17

Open
akhavr opened this issue Nov 1, 2016 · 4 comments
Open

recurrentcontainer_2 shape mismatch #17

akhavr opened this issue Nov 1, 2016 · 4 comments

Comments

@akhavr
Copy link

akhavr commented Nov 1, 2016

Tried to reproduce your results, but fail. After doing minor fixes re changed case, etc, I get:

INFO:lib.nn_model.train:Full-data-pass iteration num: 1
/home/akhavr/src/seq2seq/.env/local/lib/python2.7/site-packages/keras/models.py:610: UserWarning: The "show_accuracy" argument is deprecated, instead you should pass the "accuracy" metric to the model at compile time:
`model.compile(optimizer, loss, metrics=["accuracy"])`
  warnings.warn('The "show_accuracy" argument is deprecated, '
Traceback (most recent call last):
  File "bin/train.py", line 37, in <module>
    learn()
  File "bin/train.py", line 33, in learn
    train_model(nn_model, w2v_model, dialog_lines_for_nn, index_to_token)
  File "/home/akhavr/src/seq2seq/debug_seq2seq/lib/nn_model/train.py", line 87, in train_model
    nn_model.fit(X_train, Y_train, batch_size=TRAIN_BATCH_SIZE, nb_epoch=1, show_accuracy=True, verbose=1)
  File "/home/akhavr/src/seq2seq/.env/local/lib/python2.7/site-packages/keras/models.py", line 627, in fit
    sample_weight=sample_weight)
  File "/home/akhavr/src/seq2seq/.env/local/lib/python2.7/site-packages/keras/engine/training.py", line 1052, in fit
    batch_size=batch_size)
  File "/home/akhavr/src/seq2seq/.env/local/lib/python2.7/site-packages/keras/engine/training.py", line 983, in _standardize_user_data
    exception_prefix='model target')
  File "/home/akhavr/src/seq2seq/.env/local/lib/python2.7/site-packages/keras/engine/training.py", line 111, in standardize_input_data
    str(array.shape))
Exception: Error when checking model target: expected recurrentcontainer_2 to have shape (None, 6, 512) but got array with shape (32, 6, 20001)

What I'm doing wrong?

@farizrahman4u
Copy link

Shape of your model is not compatible with your training data.

@akhavr
Copy link
Author

akhavr commented Nov 2, 2016

I know what that message means. I opened the issue, because this happens out of the box. Does it still works for you?

If interested, I'll upload my changes to a fork.

@dmartincc
Copy link

@akhavr Could you post how you solved this issue?

@akhavr
Copy link
Author

akhavr commented Nov 15, 2016

@dmartincc I didn't, I've moved on instead

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

3 participants