udibr / headlines

Automatically generate headlines to short articles
MIT License
526 stars 150 forks source link

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

Open rabeeaghulam opened 6 years ago

rabeeaghulam commented 6 years ago

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 commented 5 years ago

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 commented 3 years ago

@taoyafan Bro Thanx you are awesome buddy