ColdStormy
ColdStormy

Reputation: 572

Is the final history object of sequential model.fit() calls accurate?

I have several seperate training datasets that when read as one crash the kernel in jupyter. So I did a workaround and read them separately in a sequence and call fit() on the same model-object.

To get accuracy metrics I am only grabbing the final history-object, but does this also represent all previous fit()-calls?

Upvotes: 0

Views: 127

Answers (1)

Poe Dator
Poe Dator

Reputation: 4913

By default history is initialized as a callback every time anew when you call fit. This is unless you provide some alternative. One way to do so is to pass the model's history from one fit() call to the next fit() as a callback:

model.fit(x, y, batch_size, epochs, callbacks=[model.history])

this way the new values will be appended to the previously accumulated values, so you'd get statistics over multiple runs of fit().

If you need something more special - save and process history objects from each fit or write a custom callback with memory.

Upvotes: 1

Related Questions