Early stopping can be added to avoid long training time #564
AslantheAslan
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Hi @AslantheAslan, from tsai.basics import *
from fastai.callback.tracker import EarlyStoppingCallback
X, y, splits = get_UCR_data('LSST', split_data=False)
tfms = [None, TSClassification()]
batch_tfms = TSStandardize(by_sample=True)
dls = get_ts_dls(X, y, splits=splits, tfms=tfms, batch_tfms=batch_tfms)
learn = ts_learner(dls, metrics=accuracy, cbs=[ShowGraph(), EarlyStoppingCallback(monitor='accuracy')])
learn.fit_one_cycle(2, 1e-2) You can read the docs here. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to get the best accuracy score out of all scopes in 100 epochs, for example. But I couldn't find out how to get the best accuracy. In other words, I wonder if there is an early stopping option in tsai API.
Beta Was this translation helpful? Give feedback.
All reactions