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

ValueError: Can not squeeze dim[2], expected a dimension of 1, got 150 for 'QAModel/Squeeze_300' (op: 'Squeeze') with input shapes: [?,300,150]. #2

Open
feemthan opened this issue Apr 19, 2018 · 7 comments

Comments

@feemthan
Copy link

I am getting this error when i run this in google collab .

@tbrooks007
Copy link

tbrooks007 commented May 29, 2018

FYI - I don't think this is just a google collab issue. I get this when I train RNET locally as well.
If you are training you can comment this code out, it calculates from RNN probabilities that don't seem to be being used as there is other commented out code that would use these probs.

Once I removed this code on my fork...training proceeds.

@AshayNayak
Copy link

I am also getting the same error:
ValueError: Can not squeeze dim[2], expected a dimension of 1, got 150 for 'QAModel/Squeeze_300' (op: 'Squeeze') with input shapes: [?,300,150].

1 similar comment
@maakvolunteer
Copy link

I am also getting the same error:
ValueError: Can not squeeze dim[2], expected a dimension of 1, got 150 for 'QAModel/Squeeze_300' (op: 'Squeeze') with input shapes: [?,300,150].

@neerajvashistha
Copy link

FYI - I don't think this is just a google collab issue. I get this when I train RNET locally as well.
If you are training you can comment this code out, it calculates from RNN probabilities that don't seem to be being used as there is other commented out code that would use these probs.

Once I removed this code on my fork...training proceeds.

@tbrooks007 you have written "this code out" what are you referring to? Can you please help?

Thanks!

@nikitatare
Copy link

Can anyone help me with above issue

@libertatis
Copy link

I replace tf.squeeze(self.rnet_attention, axis=[2]) with tf.reduce_sum(self.rnet_attention, axis=[2])
and reduce the shape: [batch_size, seq_len, hidden_size] -> shape: [batch_size, seq_len],
So we can use it to compute the RNet Attention Probabilities.

@Dhruvadityamittal
Copy link

I replace tf.squeeze(self.rnet_attention, axis=[2]) with tf.reduce_sum(self.rnet_attention, axis=[2])
and reduce the shape: [batch_size, seq_len, hidden_size] -> shape: [batch_size, seq_len],
So we can use it to compute the RNet Attention Probabilities.

Yes its working

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

8 participants