ValueError: feeding
magnumical opened this issue · 2 comments
magnumical commented
Hi!
I encountered this issue while I was trying to feed my data.
My input shape:
- X_train(967680,64)
- train_labels (967680,1)
- X_test(1075020,64)
- test_labels(1075020,1)
Paraneters
params['batch_size'] = 1024
Traceback (most recent call last):
File "onEEGcode.py", line 98, in <module>
accuracy, loss, t_step = model.fit(X_train, train_labels, X_test, test_labels)
File "D:\GRAPHneuralNET\cnn_graph-master\lib\models.py", line 109, in fit
learning_rate, loss_average = sess.run([self.op_train, self.op_loss_average], feed_dict)
File "C:\Users\REZA\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 929, in run
run_metadata_ptr)
File "C:\Users\REZA\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 1128, in _run
str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (1024, 1) for Tensor 'inputs/labels:0', which has shape '(1024,)'
python 3.6
tensorflow 1.13.1
mdeff commented
Maybe make train_labels
and test_labels
as (967680,)
instead of (967680,1)
?
magnumical commented
It worked by reshape() but still can be solved by using squeeze()
THANKS