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

Prediction is giving error of input shape in cell 28. #36

Open
rabeeaghulam opened this issue May 29, 2018 · 2 comments
Open

Prediction is giving error of input shape in cell 28. #36

rabeeaghulam opened this issue May 29, 2018 · 2 comments

Comments

@rabeeaghulam
Copy link

Dimensions must be equal, but are 40 and 50 for 'simplecontext_1/add' (op: 'Add') with input shapes: [64,40,40], [64,1,50].

@taoyafan
Copy link

This error occurs in lines 10 of the function simple_context() in cell 27.
Fix the code in lines 8 from
activation_energies = K.batch_dot(head_activations, desc_activations, axes=([2],[2]))
to
activation_energies = K.batch_dot(head_activations, desc_activations, axes=(2,2))

After you fix this error, you should also fix the code in lines 18 from
desc_avg_word = K.batch_dot(activation_weights, desc_words, axes=([2],[1]))
to
desc_avg_word = K.batch_dot(activation_weights, desc_words, axes=(2,1))

@harshCali
Copy link

@taoyafan Bro Thanx you are awesome buddy

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