tensor flow 1.6
I was very surprised when I noticed that the following code is working:
a = tf.constant(5)
b = a + np.array(25)
b.eval()
I expected this to cause an error. How does this process work with tensor flow? Is the numpy array added as a constant tensor to the graph so that it can still be run on the GPU? Or will there be some break to figure things out on the processor?
In other words, are there any flaws in writing this method, as opposed to manually defining the own tensor tensor tf.constant?
source
share