Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
potential fix for fastai/fastbook#263
  • Loading branch information
Tagar authored Sep 14, 2020
1 parent 760b54e commit 92d8a92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nbs/14_callback.schedule.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@
" assert torch.all(pcts >= 0)\n",
" pcts = torch.cumsum(pcts, 0)\n",
" def _inner(pos):\n",
" if pos == 1.: return scheds[-1](1.)\n",
" if int(pos) == 1: return scheds[-1](1.)\n",
" idx = (pos >= pcts).nonzero().max()\n",
" actual_pos = (pos-pcts[idx]) / (pcts[idx+1]-pcts[idx])\n",
" return scheds[idx](actual_pos.item())\n",
Expand Down

0 comments on commit 92d8a92

Please sign in to comment.