You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for the helpful tutorial! I am trying your tutorial code for word2vec but seems there is a version issue.
I searched and found out that seems placeholder is no longer supported in TensorFlow v2, could you please update the tutorial code or share a hint on how to fix it? Thanks!
Error is found at:
word2vec_tensorflow -> Defien Tensorflow Graph
`import tensorflow as tf
making placeholders for X_train and Y_train
x = tf.placeholder(tf.float32, shape=(None, ONE_HOT_DIM))
y_label = tf.placeholder(tf.float32, shape=(None, ONE_HOT_DIM))`
Error message:
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in
1 import tensorflow as tf
2 # making placeholders for X_train and Y_train
----> 3 x = tf.placeholder(tf.float32, shape=(None, ONE_HOT_DIM))
4 y_label = tf.placeholder(tf.float32, shape=(None, ONE_HOT_DIM))
AttributeError: module 'tensorflow' has no attribute 'placeholder'`
The text was updated successfully, but these errors were encountered:
versions: I am using tensorflow 2; python3
Thank you for the helpful tutorial! I am trying your tutorial code for word2vec but seems there is a version issue.
I searched and found out that seems placeholder is no longer supported in TensorFlow v2, could you please update the tutorial code or share a hint on how to fix it? Thanks!
Error is found at:
word2vec_tensorflow -> Defien Tensorflow Graph
`import tensorflow as tf
making placeholders for X_train and Y_train
x = tf.placeholder(tf.float32, shape=(None, ONE_HOT_DIM))
y_label = tf.placeholder(tf.float32, shape=(None, ONE_HOT_DIM))`
Error message:
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in
1 import tensorflow as tf
2 # making placeholders for X_train and Y_train
----> 3 x = tf.placeholder(tf.float32, shape=(None, ONE_HOT_DIM))
4 y_label = tf.placeholder(tf.float32, shape=(None, ONE_HOT_DIM))
AttributeError: module 'tensorflow' has no attribute 'placeholder'`
The text was updated successfully, but these errors were encountered: