Open noajshu opened 6 years ago
Getting same error please help if you have fixed it.
Seems to be some issue with the tensorflow API compatibility. May I please know which version are you using?
@ArunMichaelDsouza , same error here. Using Tensorflow latest version with Python 3.7.0.
This warning occurs when running the project with a dataset folder that has less than 20 images
The retrain.py randomly splits and assign images into three sets i.e., 'training', 'testing', and 'validation' (like the same old legacy method in scikit learn) which consider count of file validation as 0 (zero) , if you have less than 20 total training images for a particular label. hence ZeroDivisionError: integer division or modulo by zero
occurs
Here is the comment in tensorflow/tensorflow/examples/image_retraining/retrain.py that explains what is happening:
# This looks a bit magical, but we need to decide whether this file should # go into the training, testing, or validation sets, and we want to keep # existing files in the same set even if more files are subsequently # added. # To do that, we need a stable way of deciding based on just the file name # itself, so we do a hash of that and then use that to generate a # probability value that we use to assign it
.
thread from https://github.com/tensorflow/tensorflow/issues/2072