Tensorflow_mLSTM icon indicating copy to clipboard operation
Tensorflow_mLSTM copied to clipboard

ValueError: all the input arrays must have same number of dimensions

Open jozi opened this issue 7 years ago • 2 comments

get this error when run extract_weights.py in line 97 : b = np.concatenate((Wib,Wfb,Wob,Whb), axis=1)

ValueError: all the input arrays must have same number of dimensions

jozi avatar Nov 03 '17 06:11 jozi

you change train_mLSTM.py in this line - Wmb = tf.Variable(tf.zeros([1, rnn_size]),name = 'Wmb')

jozi avatar Nov 03 '17 06:11 jozi

Hello @jozi !

Thank you for pointing this out. I have updated the extract_weights.py script to work with the train_mLSTM.py script as it is now.

The Wmb variable was redundant in the older version of the train_mLSTM.py script, it was defined (by accident) but never actually used, and because the variables in weights_list are listed in the order in which they are defined in train_mLSTM.py, this is what caused the problem.

Hope this helps!

jonny-d avatar Nov 06 '17 19:11 jonny-d