tensorflow-finetune-flickr-style icon indicating copy to clipboard operation
tensorflow-finetune-flickr-style copied to clipboard

ValueError

Open zhuyanfang000 opened this issue 7 years ago • 3 comments

Hi,I am so sorry to trouble you again, but I have a issue troubled me these days. I use your code https://github.com/joelthchao/tensorflow-finetune-flickr-style/blob/master/finetune.py to finetune the network onto my own data to classify kaggle Dogs VS. Cats. It runs this error: ValueError: Cannot feed value of shape () for Tensor u'Placeholder:0', which has shape '(50, 227, 227, 3)' Why did it happened? Please help me.

zhuyanfang000 avatar Aug 15 '17 09:08 zhuyanfang000

It seems like you provide an empty batch to the network, therefore the shape is ().

joelthchao avatar Aug 15 '17 15:08 joelthchao

In the finetune.py there is a parameter batch_size = 50, and how could it be an empty batch? It seems that the parameter did not transfer to the next_batch function, but I do not know why.

zhuyanfang000 avatar Aug 18 '17 03:08 zhuyanfang000

You need to check the batch data provide by next_batch. If it returns empty batch, you may need to validate the path to image files.

joelthchao avatar Aug 20 '17 09:08 joelthchao