Closed cjpurackal closed 7 years ago
After making your change to code, I still get
Traceback (most recent call last):
File "/home/hanbin/Desktop/Deep Leaning/Music_Generator_Demo-master/rbm_chords.py", line 87, in
Im using tensorflow .12
I believe you're using the original code from this repository. The pull request hasn't been accepted, so the changes are not present in the original code. Check out the "Files Changed" tab in this pull request to know about the changes(represented in the green region)
Specifically, change the line : [, , x_sample] = control_flow_ops.While(lambda count, num_iter, *args: count < num_iter, gibbs_step, [ct, tf.constant(k), x], 1, False)
to
[, , x_sample] = control_flow_ops.while_loop(lambda count, num_iter, *args: count < num_iter,gibbs_step, [ct, tf.constant(k), x])
File "rbm_chords.py", line 116, in
keep getting this error
@teerth can you specify what the error is ? i don't see it in your comment
python rbm_chords.py File "rbmchords.py", line 78 [, _, x_sample] = control_flow_ops.while_loop(lambda count, num_iter, *args: count < num_iter, ^ IndentationError: unindent does not match any outer indentation level
getting the above error after implementing the pull code
change the code you mentioned with song = song[:int(np.floor(song.shape[0]/num_timesteps)*num_timesteps)] @teerth
@swarathesh check the spacing in line
yep thanks @true-source
after i added your change im getting this error now:
Traceback (most recent call last):
File "rbm_chords.py", line 95, in
Any idea?
EDIT:
Fixed it - according to tensorflow 1.0.0 those changed to tf.subtract, tf.multiply etc.
thanks!
Made the code compatible with tensorflow 0.12.
Changes are :
*control_flow_ops.While() -> control_flow_ops.while_loop() ( This was causing the "no attribute named while" issue which was seen in some of the youtube comments)
*initialize_all_variables() -> tf.global_variables_initializer() ( initialize_all_variables() will soon be deprecated)