NN_compression
NN_compression copied to clipboard
There is a bug in code
Dear sir,
hello,I try to run your code in Linux server, but there is a bug : ValueError: Dimensions must be equal, but are 256 and 130 for 'rnn/while/rnn/multi_rnn_cell/cell_0/cell_0/basic_rnn_cell/MatMul_1' (op: 'MatMul') with input shapes: [?,256], [130,128].
Is it my problem? Can you answer my problem? thank you
I got the same Error. it seems that somewhere the 2*hidden_size have been changed to 2+hidden_size.
thank you! Do u solve this problem?I try to change some parameters like but this problem still exist. If you successfully debug, could u tell me ? Thank you!
I also struggled with this problem. OK, I will give a message here, if I solved.
I have the same problem. Since the paper was published recently, this code might not be up-to-date.
Hi all! Thanks for reporting the bug. I am currently on vacation until Thursday, Jan 18th. I will take a look at the bug after the same.
The code was developed on Tensorflow 0.12.1 and is working fine on this version. The bug seems to be coming in the latest stable version TF1.4
I am working on getting the code working on newer version, but until then you may run on the older version (0.12.1)
@viviancui59 hi, do you get the expected results as the author provided? Thanks for replying.
Please consider documenting such version requirements, in a requirements.txt
if nothing else.
apologies. created a requirements.txt.
Thanks!
I found the fix solution!
Change the Line 61 of src/models/sequence_predictor_model.py
cell = tf.nn.rnn_cell.MultiRNNCell([cell] * self.config.num_layers, state_is_tuple=False)
to
def new_cell():
if self.config.model_type == "gru":
cell = tf.nn.rnn_cell.GRUCell(self.config.hidden_size)
elif self.config.model_type == "rnn":
cell = tf.nn.rnn_cell.BasicRNNCell(self.config.hidden_size)
return cell
cell = tf.nn.rnn_cell.MultiRNNCell([new_cell() for _ in range(self.config.num_layers)], state_is_tuple = False)