fchollet / deep-learning-with-python-notebooks

Jupyter notebooks for the code samples of the book "Deep Learning with Python"
MIT License
18.68k stars 8.65k forks source link

6.3: In the generator definition, the simpler range() can be used instead of np.arange() #82

Open jondo opened 5 years ago

jondo commented 5 years ago
rows = np.arange(i, min(i + batch_size, max_index))
#can be replaced by the simper
rows = range(i, min(i + batch_size, max_index))
morenoh149 commented 5 years ago

can you time it to see if there's any performance difference?

jondo commented 5 years ago

I'm using different (much higher dimensional) data, and I see no significant speed difference in a loop of several generator calls.