Tensorflow Hello World program
. 1 Import tensorflow TF AS
. 3 # create a constant
. 4 Hello = tf.constant ( ' the Hello, World! ' )
. 5
. 6 # create session
. 7 Sess = tf.Session ()
. 8
. 9 # perform
Result = sess.run (Hello)
. 11
is # close the session
is sess.close ()
# output
Print (result)
or
import tensorflow as tf
hello =tf.constant("hello wold")
sess= tf.Session()
print(sess.run(hello))
or
import tensorflow as tf
hello =tf.constant("hello wold")
sess= tf.Session()
print(sess.run(hello))
0 comments:
Post a Comment