keras model.fit_generator() several times slower than model.fit()

0 votes
In Keras 1.2.2, there are referencing merge and it has multiprocessing included, but model.fit_generator() is still about 4-5x slower than model.fit() due to disk reading speed limitations. How can this be sped up, say through additional multiprocessing?

Can anyone help me with this?
May 31 in Python by ana1504.k
• 7,890 points
521 views

1 answer to this question.

0 votes
You may want to check out the workers and max_queue_size parameters of fit_generator() in the documentation. Essentially, more workers create more threads for loading the data into the queue that feeds data to your network. There is a chance that filling the queue might cause memory problems, though, so you might want to decrease max_queue_size to avoid this.
answered May 31 by SDeb
• 13,210 points

Related Questions In Python

+1 vote
1 answer

Replace every character of string by character whose ASCII value is K times more than it

Hi @Vaibhav! In such a case what ...READ MORE

answered 3 days ago in Python by Kalgi
• 45,780 points
97 views
0 votes
1 answer

How to get all related Django model objects in Python?

This actually gives you the property names ...READ MORE

answered Nov 14, 2018 in Python by Nymeria
• 3,520 points

edited Dec 18, 2018 by Nymeria 860 views
0 votes
1 answer

How to fit a histogram using Python?

Here is an example working on py2.6 ...READ MORE

answered Dec 26, 2018 in Python by Nymeria
• 3,520 points
894 views
0 votes
1 answer

Index of predicted wrong data in Keras, how to find it?

Simply, use: model.predict() pred = model.predict(x_test) indices = [i for ...READ MORE

answered Sep 28, 2018 in Python by Priyaj
• 56,960 points
424 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 402 views
0 votes
1 answer

How to get rid of tensorflow verbose messages with Keras?

If you are using TensorFlow 0.12, you ...READ MORE

answered Jan 24 in Python by SDeb
• 13,210 points
538 views
0 votes
1 answer

Django model iterate fields

You can try the following: getattr(foo.__class__, <field_name>)   This should ...READ MORE

answered Apr 10 in Python by SDeb
• 13,210 points
282 views