The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

tf.placeholder (TensorFlow)

tf.placeholder (TensorFlow)

Super Learner
0
Votes
2
Answer
I typed this:

inputs = tf.placeholder(tf.float32,[None,input_size])
targets = tf.placeholder(tf.float32,[None,output_size])

And it gave me:

module 'tensorflow' has no attribute 'placeholder'
2 Answers

365 Team
0
Votes

Hi Rajasingh,
Thanks for reaching out!
Which version of TF are you running? You can check that by writing:

print(tf.__version__)

Best,
The 365 Team

Super Learner
0
Votes

My version is 2.2.0, so is something wrong with the version. Please help.

I solve it by importing TF in this way->>> import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()

3 weeks

I just realized that we are following the worng course. Acecss to this one: https://365datascience.teachable.com/courses/614390/lectures/10998636 which is “Deep Learning with TensorFlow 2.0”

3 weeks
×
EXTENDED SALE
Learn Data Science this Summer!
Get 50% OFF