I’m getting the following error from the code derived from https://github.com/Gruntrexpewrus/quantum-neural-networks/blob/master/fraud_detection/fraud_detection.py
InvalidArgumentError: You must feed a value for placeholder tensor 'Placeholder' with dtype float and shape [24,10]
[[Node: Placeholder = Placeholder[dtype=DT_FLOAT, shape=[24,10], _device="/job:localhost/replica:0/task:0/cpu:0"]()]]
I have tried to fix this error by modifying the following line slightly:
# Encoding classes into one-hot form
one_hot_input = np.zeros((batch_size, 2))
for i in range(batch_size):
if int(classes[i]) == 0:
# Encoded such that genuine transactions should be outputted as a photon in the first mode
one_hot_input[i] = [1, 0]
else:
one_hot_input[i] = [0, 1]
one_hot_input = one_hot_input.astype(float)
The array shape is already fine, so there is no need to modify it. Which portion of the code might be the cause of this datatype error and what could be the probable solution?