Skip to content

Commit

Permalink
Add comment to reflect new gradient scaling interface
Browse files Browse the repository at this point in the history
  • Loading branch information
liukidar committed Jul 4, 2024
1 parent 3778164 commit 3afec11
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/0b_two_moons_backprop.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
" with pxu.step(model):\n",
" (e, y_), g = pxf.value_and_grad(pxu.Mask(pxnn.LayerParam, [False, True]), has_aux=True)(loss)(x, y, model=model)\n",
" \n",
" # Note there is not gradient scaling as we have already taken the mean of the loss, not its sum.\n",
" optim_w.step(model, g[\"model\"])"
]
},
Expand Down

0 comments on commit 3afec11

Please sign in to comment.