meetps / crnn-music-genre-classification

Tensorflow Implementation of Convolutional Recurrent Neural Networks for Music Genre Classification
53 stars 18 forks source link

crnn.py dynamic_rnn runtime error : ValueError #2

Open iamuspace opened 7 years ago

iamuspace commented 7 years ago

Hi

I have runtime error for execution crnn.py

My env : OS : Windows 7 Python 3.5.3 Anaconda

Any solution to fix it ?


crnn.py line 67

gru1_out, state = tf.nn.dynamic_rnn (gru1, gru1_in, dtype=tf.float32, scope='gru1')

ValueError: Trying to share variable gru1/multi_rnn_cell/cell_0/gru_cell/gates/kernel, but specified shape (64, 64) and found shape (160, 64).

iamuspace commented 7 years ago

I worked OK by changing some code.

stacked_rnn = []
for i in range(15):
    stacked_rnn.append(tf.nn.rnn_cell.GRUCell(32)) 
gru1 = tf.nn.rnn_cell.MultiRNNCell( stacked_rnn )  

cost = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=y_, labels=y))
22w2w2 commented 6 years ago

Hello, this project includes the final accuracy test? Isn't it only the training of the model? Thank you