Given a computational graph in tensorflow find errors if any in the underlying code.
import tensorflow as tf
import numpy as np
input = tf.placeholder(shape=(1, 224, 224, 3), dtype=tf.float32)
output = input + 5
with tf.Session() as sess:
network_input = np.random.randint(5, size=(700, 350, 3))
out = sess.run(output, feed_dict = {input : network_input})
The code is throwing error as the shape of the placeholder and the input given is not matching.
So for fixing it I am changing the shape of the place holder.
Is it the correct approach or the input given should be reshaped to the placeholder shape?