Python Forum
Attribute Error while using tensor flow
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Attribute Error while using tensor flow
#1
Guys please help me out..
I am getting a error....

HERE'S MY CODE.
import tensorflow as tf
node1 = tf.constant(3.0)
node2 = tf.constant(4.0)
print(node1)
HERE'S THE ERROR
Error:
Traceback (most recent call last): File "/Users/admin/Documents/tensorflow.py", line 1, in <module> import tensorflow as tf File "/Users/admin/Documents/tensorflow.py", line 2, in <module> node1 = tf.constant(3.0) AttributeError: 'module' object has no attribute 'constant'
I am using OSX and python 3.6...
Reply
#2
change the name of your own file to something different from tensorflow.py
Reply
#3
THANKS buran I GOT THE PROBLEM SOLVED..
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Using SHAP Library for my LSTM model - "Attribute Error" vatsalmtailor 0 2,040 Jul-13-2022, 04:34 PM
Last Post: vatsalmtailor
  scikit-tensor package Lamine 1 2,528 Feb-27-2022, 01:16 PM
Last Post: jefsummers
  error "list object has no attribute transpose()" usercat123 4 4,187 Jan-28-2022, 12:01 PM
Last Post: usercat123
  Attribute Error Raiden_Arctica 4 4,078 Mar-13-2021, 11:09 AM
Last Post: Raiden_Arctica
  Attribute error in Dataframes deshanish 1 2,371 Jul-15-2020, 08:38 AM
Last Post: snippsat
  Attribute error - Sympy VictorG8 1 4,893 Apr-09-2020, 06:03 PM
Last Post: snippsat
  Executing Scipy Tensor Product John_Doe 1 2,354 Dec-06-2019, 10:28 AM
Last Post: paul18fr
  Install tensor flow for Python 2.7 in Windows 10 ErnestTBass 4 6,618 Jul-26-2019, 02:11 PM
Last Post: ThomasL
  Can you help me with this error? IndexError: invalid index of a 0-dim tensor. DerBerliner 1 4,132 Feb-28-2019, 05:47 PM
Last Post: Larz60+
  NLTK Download Attribute error laila1a 1 8,454 Jan-27-2019, 12:03 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020