Fix error in OneCycleSchedule._interpolate(), fixes #56

main
Aurélien Geron 2019-11-05 11:16:48 +08:00
parent c618ee4633
commit 35bcff5450
1 changed files with 2 additions and 2 deletions

View File

@ -1679,7 +1679,7 @@
" self.last_rate = last_rate or self.start_rate / 1000\n",
" self.iteration = 0\n",
" def _interpolate(self, iter1, iter2, rate1, rate2):\n",
" return ((rate2 - rate1) * (iter2 - self.iteration)\n",
" return ((rate2 - rate1) * (self.iteration - iter1)\n",
" / (iter2 - iter1) + rate1)\n",
" def on_batch_begin(self, batch, logs):\n",
" if self.iteration < self.half_iteration:\n",
@ -2618,7 +2618,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.7.4"
},
"nav_menu": {
"height": "360px",