I am using Keras backend function to compute the gradient in reinforcement learning set up and following is the snippet of code. For this code, I am getting an error which is below as well. What could be the reason for it?
1 X = K.placeholder(shape=(None, 32, 32, 3))
2 train_fxn = K.function([X], [], updates=updates)
3 X = self.states[0].reshape(1, 32, 32, 3)
4 train_fxn([X])
Error is
InvalidArgumentError (see above for traceback): You must feed a value for placeholder tensor 'sequential_2_input_1' with dtype float and shape [?,32,32,3]
[[Node: sequential_2_input_1 = Placeholder[dtype=DT_FLOAT, shape=[?,32,32,3], _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]