Open EmadBinAbid opened 6 years ago
I used
music = tf.concat([music, x_out],0)
And
loop_vars = [time_steps, iterations, U, ut, x, music] [, , , , , music] = tf.while_loop(lambda count, num_iter, *args: count < num_iter, generate_recurrence, loop_vars, shape_invariants=[time_steps.get_shape(), iterations.get_shape(), U.get_shape(), u_t.get_shape(),x.get_shape(), tf.TensorShape([None, None])])
@Guije2018 where is the time_steps,iterations and music,they don't be define in this function
@BLACKMogus See https://github.com/dshieble/Music_RNN_RBM/issues/7 time_steps = tf.constant(1, tf.int32) iterations = tf.constant(num) u_t = tf.zeros([1, n_visible], tf.float32) music = tf.zeros([1, n_visible], tf.float32)
Error: Traceback (most recent call last): File "rnn_rbm_generate.py", line 45, in
main(sys.argv[1])
File "rnn_rbm_generate.py", line 40, in main
generated_music = sess.run(generate(300), feed_dict={x: song_primer}) #Prime the network with song primer and generate an original song
File "C:\Users\HP\Downloads\music-github\Music_RNN_RBM\rnn_rbm.py", line 96, in generate
tf.zeros([1, n_visible], tf.float32)])
File "C:\Users\HP\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 3291, in while_loop
return_same_structure)
File "C:\Users\HP\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 3004, in BuildLoop
pred, body, original_loop_vars, loop_vars, shape_invariants)
File "C:\Users\HP\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2939, in _BuildLoop
body_result = body(*packed_vars_for_body)
File "C:\Users\HP\Downloads\music-github\Music_RNN_RBM\rnn_rbm.py", line 74, in generate_recurrence
music = tf.concat(0, [music, x_out])
File "C:\Users\HP\Anaconda3\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1122, in concat
tensor_shape.scalar())
File "C:\Users\HP\Anaconda3\lib\site-packages\tensorflow\python\framework\tensor_shape.py", line 848, in assert_is_compatible_with
raise ValueError("Shapes %s and %s are incompatible" % (self, other))
ValueError: Shapes (2, 1, 780) and () are incompatible