Skip to content

Commit

Permalink
Add amax gradient fn
Browse files Browse the repository at this point in the history
  • Loading branch information
joelshepherd committed Dec 5, 2022
1 parent 027bac0 commit 31196c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions shumai/tensor/register_gradients.ts
Expand Up @@ -48,6 +48,9 @@ const impls = {
add: (ctx: GradContext) => {
return possiblyReduce(ctx.backward_input, ctx)
},
amax: (ctx: GradContext) => {
return ctx.backward_input
},
conv2d: (ctx: GradContext) => {
const [x, w, sx, sy, px, py, dx, dy, g] = <
[Tensor, Tensor, number, number, number, number, number, number, number]
Expand Down

0 comments on commit 31196c0

Please sign in to comment.