Parser-v3
Parser-v3 copied to clipboard
axis error in recurrent.py
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?