上QQ阅读APP看书,第一时间看更新
How it works...
All constants, variables, and placeholders will be defined in the computation graph section of the code. If we use the print statement in the definition section, we will only get information about the type of tensor, and not its value.
To find out the value, we need to create the session graph and explicitly use the run command with the desired tensor values as fetches:
print(sess.run(t_1))
# Will print the value of t_1 defined in step 1