Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghaoz committed Jan 4, 2025
1 parent 9a861a4 commit 28b3dc2
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions common/nn/op_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,6 @@ func TestDiv(t *testing.T) {
assert.InDeltaSlice(t, []float32{0.5, 2.0 / 3.0, 0.75, 4.0 / 5.0, 5.0 / 6.0, 6.0 / 7.0}, z.data, 1e-6)

// Test gradient
x = Rand(2, 3).RequireGrad()
y = Rand(2, 3).RequireGrad()
z = Div(x, y)
z.Backward()
dx := numericalDiff(func(x *Tensor) *Tensor { return Div(x, y) }, x)
allClose(t, x.grad, dx)
Expand Down

0 comments on commit 28b3dc2

Please sign in to comment.