TypeError: 'float' object cannot be interpreted as an integer

I'm trying to start preparing images for the neural network

I use the following data.py (github)

But when compiling writes the following: enter a description of the image here

Maybe someone knows how to fix it, because I'm not very friendly with Python, more on Java :3

Thanks!

P.S. I have Python 3.6.6 x64 (Anaconda For Windows)

Author: Alrott SlimRG, 2018-10-11

1 answers

Try replacing:

total = len(images) / 2

By (integer division):

total = len(images) // 2
 6
Author: MaxU, 2018-10-11 17:27:25