music-generation-using-rnn
music-generation-using-rnn copied to clipboard
generate method err
Hi there, just read your article, and there are 1 error in ur code in generate method, look's like umissed this :
normalized_input = np.array(network_input) normalized_input = np.reshape(normalized_input, (len(network_input), 100, 1))
Cause normalized_input is not defined anywhere.
Added this piece into the code and it does not solve it. I've got the following error:
Initiating music generation process.......
Loading Model weights.....
---------------------------------------------------------------------------
InvalidArgumentError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/ops.py in _create_c_op(graph, node_def, inputs, control_inputs)
1606 try:
-> 1607 c_op = c_api.TF_FinishOperation(op_desc)
1608 except errors.InvalidArgumentError as e:
InvalidArgumentError: Dimension 1 in both shapes must be equal, but are 79 and 138. Shapes are [256,79] and [256,138]. for 'Assign_17' (op: 'Assign') with input shapes: [256,79], [256,138].
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
14 frames
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/ops.py in _create_c_op(graph, node_def, inputs, control_inputs)
1608 except errors.InvalidArgumentError as e:
1609 # Convert to ValueError for backwards compatibility.
-> 1610 raise ValueError(str(e))
1611
1612 return c_op
ValueError: Dimension 1 in both shapes must be equal, but are 79 and 138. Shapes are [256,79] and [256,138]. for 'Assign_17' (op: 'Assign') with input shapes: [256,79], [256,138].
I have added the fix for the undefined normalised_input variable. @AngelRibeiro10 , I was not able to reproduce the error mentioned above. It seems you are not able to load the model weights. Try re-downloading the model weights.
hi. prepare sequence is not defined anywhere and its giving an error. Can somebody tell me how to fix it?