Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Machine Learning by (19k points)
I'm trying to retraining the Inception v3 model in tensorflow for my own custom categories. I have downloaded some data and formatted it into directories. When I run, the python script creates bottlenecks for the images, and then when it runs, on the first training step( step 0) it has a critical error, where it tries to modulo by 0. It appears in the get_image_path function when computing the mod_index, which is index % len(category_list) so the category_list must be 0 right?

Why is this happening and how can I prevent it?

1 Answer

0 votes
by (33.1k points)

I've modified retrain.py to ensure that at least there is an image in the validation

For example:

if len(validation_images) == 0:

   validation_images.append(base_name)

elif percentage_hash < validation_percentage

Hope this answer helps you! For more details, Machine Learning study the Machine Learning Course 

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...