thulab / DeepHash

An Open-Source Package for Deep Learning to Hash (DeepHash)
MIT License
558 stars 126 forks source link

ValueError: Cannot feed value of shape (128, 0) for Tensor Placeholder_1:0, which has shape (?, 10) #58

Open nikkon3 opened 2 years ago

nikkon3 commented 2 years ago

When i try to train dch with train_val_script.py and its default args i get the following error:

Traceback (most recent call last): File "train_val_script.py", line 61, in model_weights = model.train(train_img, database_img, query_img, args) File "/home/nikos/DeepHash/examples/dch/model/dch/init.py", line 9, in train model.train(img_train) File "/home/nikos/DeepHash/examples/dch/model/dch/dch.py", line 187, in train self.img_label: labels}) File "/home/nikos/DeepHash/env/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 968, in run run_metadata_ptr) File "/home/nikos/DeepHash/env/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1165, in _run f'Cannot feed value of shape {str(np_val.shape)} for Tensor ' ValueError: Cannot feed value of shape (128, 0) for Tensor Placeholder_1:0, which has shape (?, 10)

The dataset i use is the cifar10. Any ideas what is going wrong ? thanks

rsindper commented 2 years ago

Hi, did you find the solution to this error? I had the same error coming up when running "train_val_script.py"