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

axis error in recurrent.py #1

Open
WangYuxuan93 opened this issue Aug 2, 2018 · 0 comments
Open

axis error in recurrent.py #1

WangYuxuan93 opened this issue Aug 2, 2018 · 0 comments

Comments

@WangYuxuan93
Copy link

WangYuxuan93 commented Aug 2, 2018

Hi,
I'm trying the parser training module with the basic
python main.py train ParserNetwork
command and only changed the directories in the default.cfg to my own.
Then I got this error:

ValueError: Shape must be at least rank 3 but is rank 2 for 'ParserNetwork_1/Embeddings/form/Subtoken/Subtoken/RNN-0/RNN/concat' (op: 'ConcatV2') with input shapes: [100,400], [100,1200], [] and with computed input tensors: input[2] = <2>.

from
/disk3/work/graph_based_parser/Parser-v3/parser/neural/recurrent.py", line 129, in LSTM

Where I found that the weights and gate_weights are loaded with shape of 2-dimension:

weights = tf.get_variable('Weights', shape=[input_size, recur_size])#, initializer=tf.orthogonal_initializer)
gate_weights = tf.get_variable('Gate_Weights', shape=[input_size, gate_size])#, initializer=tf.orthogonal_initializer)

While the concatenation are applied to dimension 3:

weights = tf.concat([weights, gate_weights], axis=2)

Thought this might be a mistake.

BTW, I didn't find the README in config directory mentioned in the README in root directory, did you forget to upload 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