Skip to content

Commit

Permalink
fixes bias shape
Browse files Browse the repository at this point in the history
  • Loading branch information
tfjgeorge committed Feb 3, 2024
1 parent 4ce6305 commit 1d61aed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nngeometry/generator/jacobian/grads.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def Jv(cls, buffer, mod, layer, x, gy, v, v_bias):
cls.flat_grad(buffer_flat, mod, layer, x, gy)
v = v.view(-1)
if v_bias is not None:
v_bias = v_bias.view(-1)
v = torch.cat((v, v_bias))
buffer.add_(torch.mv(buffer_flat, v))

Expand Down

0 comments on commit 1d61aed

Please sign in to comment.