Difference between fit and fit_generatorLoading a trained Keras model and continue trainingWhat's the difference between “samples_per_epoch” and “steps_per_epoch” in fit_generatorDifferent validation accuracy when use keras funciton fit_generator() and do prediction on every individual picture?0% accuracy with evaluate_generator but 75% accuracy during training with same data - what is going on?Difference between fit and fit_generator when doing transfer learning in kerasKeras fit_generator and fit results are differentWhy does Keras halt at the first epoch when I attempt to train it using fit_generator?Sklearn metrics values are very different from Keras valuesKeras train_on_batch() does not train the model vs fit()Incorrect reporting of Metrics during training with Keras fit_generator
Can you open the door or die? v2
Is Jesus the last Prophet?
Nth term of Van Eck Sequence
Why would a car salesman tell me not to get my credit pulled again?
Part of my house is inexplicably gone
Can a 40amp breaker be used safely and without issue with a 40amp device on 6AWG wire?
Which are the methodologies for interpreting Vedas?
Is all-caps blackletter no longer taboo?
Why is my Taiyaki (Cake that looks like a fish) too hard and dry?
Dedicated bike GPS computer over smartphone
Am I allowed to determine tenets of my contract as a warlock?
usage of mir gefallen
Remove the small black rectangle that appears at the end of environment
Is it good practice to create tables dynamically?
Placement of positioning lights on A320 winglets
Does WiFi affect the quality of images downloaded from the internet?
How do I type a hyphen in iOS 12?
How (un)safe is it to ride barefoot?
What class is best to play when a level behind the rest of the party?
Keeping track of theme when improvising
Why are ambiguous grammars bad?
What do I need to do, tax-wise, for a sudden windfall?
What do you call the action of "describing events as they happen" like sports anchors do?
Why is it bad to use your whole foot in rock climbing
Difference between fit and fit_generator
Loading a trained Keras model and continue trainingWhat's the difference between “samples_per_epoch” and “steps_per_epoch” in fit_generatorDifferent validation accuracy when use keras funciton fit_generator() and do prediction on every individual picture?0% accuracy with evaluate_generator but 75% accuracy during training with same data - what is going on?Difference between fit and fit_generator when doing transfer learning in kerasKeras fit_generator and fit results are differentWhy does Keras halt at the first epoch when I attempt to train it using fit_generator?Sklearn metrics values are very different from Keras valuesKeras train_on_batch() does not train the model vs fit()Incorrect reporting of Metrics during training with Keras fit_generator
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have a problem with implementing fit_generator from Keras. First of all, I believed I wrote a correct generator for the function, including a proper shuffling the data. However, I noticed I only get good result (high accuracy) at a much later epoch compared to using fit - the standard training function in Keras. Specifically, I get good result with train a model with fit at epoch 4 or 5. But with fit_generator, I have to wait until epoch 9 or 10. This is bad as I often use fit_generator for training a model on a big data, and the need of training the model with more epochs on big data means I have to wait much much longer.
So why is it the case? What did I miss here? Any related experience with this is appreciated. Thanks!
keras
add a comment |
I have a problem with implementing fit_generator from Keras. First of all, I believed I wrote a correct generator for the function, including a proper shuffling the data. However, I noticed I only get good result (high accuracy) at a much later epoch compared to using fit - the standard training function in Keras. Specifically, I get good result with train a model with fit at epoch 4 or 5. But with fit_generator, I have to wait until epoch 9 or 10. This is bad as I often use fit_generator for training a model on a big data, and the need of training the model with more epochs on big data means I have to wait much much longer.
So why is it the case? What did I miss here? Any related experience with this is appreciated. Thanks!
keras
Try including the code of your model and other related methods. Also, mention the type of your problem or the data.
– Shubham Panchal
Mar 25 at 3:22
add a comment |
I have a problem with implementing fit_generator from Keras. First of all, I believed I wrote a correct generator for the function, including a proper shuffling the data. However, I noticed I only get good result (high accuracy) at a much later epoch compared to using fit - the standard training function in Keras. Specifically, I get good result with train a model with fit at epoch 4 or 5. But with fit_generator, I have to wait until epoch 9 or 10. This is bad as I often use fit_generator for training a model on a big data, and the need of training the model with more epochs on big data means I have to wait much much longer.
So why is it the case? What did I miss here? Any related experience with this is appreciated. Thanks!
keras
I have a problem with implementing fit_generator from Keras. First of all, I believed I wrote a correct generator for the function, including a proper shuffling the data. However, I noticed I only get good result (high accuracy) at a much later epoch compared to using fit - the standard training function in Keras. Specifically, I get good result with train a model with fit at epoch 4 or 5. But with fit_generator, I have to wait until epoch 9 or 10. This is bad as I often use fit_generator for training a model on a big data, and the need of training the model with more epochs on big data means I have to wait much much longer.
So why is it the case? What did I miss here? Any related experience with this is appreciated. Thanks!
keras
keras
asked Mar 25 at 0:13
user1953737user1953737
163
163
Try including the code of your model and other related methods. Also, mention the type of your problem or the data.
– Shubham Panchal
Mar 25 at 3:22
add a comment |
Try including the code of your model and other related methods. Also, mention the type of your problem or the data.
– Shubham Panchal
Mar 25 at 3:22
Try including the code of your model and other related methods. Also, mention the type of your problem or the data.
– Shubham Panchal
Mar 25 at 3:22
Try including the code of your model and other related methods. Also, mention the type of your problem or the data.
– Shubham Panchal
Mar 25 at 3:22
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55329818%2fdifference-between-fit-and-fit-generator%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55329818%2fdifference-between-fit-and-fit-generator%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Try including the code of your model and other related methods. Also, mention the type of your problem or the data.
– Shubham Panchal
Mar 25 at 3:22