Skip to content

Commit 92d8a92

Browse files
authored
1 parent 760b54e commit 92d8a92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nbs/14_callback.schedule.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@
415415
" assert torch.all(pcts >= 0)\n",
416416
" pcts = torch.cumsum(pcts, 0)\n",
417417
" def _inner(pos):\n",
418-
" if pos == 1.: return scheds[-1](1.)\n",
418+
" if int(pos) == 1: return scheds[-1](1.)\n",
419419
" idx = (pos >= pcts).nonzero().max()\n",
420420
" actual_pos = (pos-pcts[idx]) / (pcts[idx+1]-pcts[idx])\n",
421421
" return scheds[idx](actual_pos.item())\n",

0 commit comments

Comments
 (0)