deep-anpr icon indicating copy to clipboard operation
deep-anpr copied to clipboard

Only the first 50 images considered during training ? !!!

Open Abduoit opened this issue 6 years ago • 3 comments

Hi, During the training, I noticed that the network always takes the first 50 images only, I found this line in the train.py

test_xs, test_ys = unzip(list(read_data("test/*.png"))[:50])

I changed it to this

test_xs, test_ys = unzip(list(read_data("test/*.png"))[:batch_size])

But I don't think this is correct, any suggestion please ??

Abduoit avatar Jan 29 '19 01:01 Abduoit

Hi Abduoit,

I think that is only for the doreport when printing out the labeled license plates and the predictions in any case since batch_size = 50 your two lines of code seem to do exactly the same. When training, plate images are generated on the fly and the output from the network is compared to those so that loss can be minimized using gradient descent. Regards

mazcallu avatar Feb 01 '19 21:02 mazcallu

@mazcallu Do you mean the number 50 is just for printing out the images in the terminal, but the actual training batch is happening based on the whole images in test folder. I just want to make sure that training process is not only considering the first 50 images, it consider the whole images

Abduoit avatar Feb 01 '19 23:02 Abduoit

Please refer to this tutorial in order to understand how a similar program to train.py works:

https://pythonprogramming.net/tensorflow-neural-network-session-machine-learning-tutorial/

Once you understand this completely, go back to train.py and you should understand what is going on.

Regards

mazcallu avatar Feb 02 '19 14:02 mazcallu