Traceback (most recent call last):
File "C:\Users\y\AppData\Local\Programs\Python\Python37\music-generator-1\rbm_chords.py", line 59, in
x = tf.placeholder(tf.float32, [None, n_visible], name="x")
AttributeError: module 'tensorflow' has no attribute 'placeholder'
I fixed it by changing: rbm_chords.py:
import tensorflow as tf
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
You will get this error if using TensorFlow 2.x:
Traceback (most recent call last): File "C:\Users\y\AppData\Local\Programs\Python\Python37\music-generator-1\rbm_chords.py", line 59, in
x = tf.placeholder(tf.float32, [None, n_visible], name="x")
AttributeError: module 'tensorflow' has no attribute 'placeholder'
I fixed it by changing: rbm_chords.py:
import tensorflow as tf
import tensorflow.compat.v1 as tf tf.disable_v2_behavior()