Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-gopichand committed Aug 24, 2024
1 parent 3a9cb10 commit 19385bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nbs/04_learner.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1455,14 +1455,14 @@
" self.run.finish()\n",
"\n",
"\n",
"class EarlyStoppingCallback(Callback):\n",
"class EarlyStoppingCB(Callback):\n",
" order = MetricsCB.order+1\n",
" def __init__(self, patience=3, min_delta=0.001):\n",
" self.patience = patience\n",
" self.min_delta = min_delta\n",
" self.best_loss = float('inf')\n",
" self.wait = 0\n",
" \n",
"\n",
" def after_epoch(self, learn):\n",
" if not learn.model.training:\n",
" current_loss = learn.metrics.all_metrics['loss'].compute()\n",
Expand Down

0 comments on commit 19385bb

Please sign in to comment.