Skip to content

Commit

Permalink
Fix repr for conv (#32897)
Browse files Browse the repository at this point in the history
add nx
  • Loading branch information
ArthurZucker authored Aug 20, 2024
1 parent fd06ad5 commit 65f4bc9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/transformers/pytorch_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class Conv1D(nn.Module):
def __init__(self, nf, nx):
super().__init__()
self.nf = nf
self.nx = nx
self.weight = nn.Parameter(torch.empty(nx, nf))
self.bias = nn.Parameter(torch.zeros(nf))
nn.init.normal_(self.weight, std=0.02)
Expand Down

0 comments on commit 65f4bc9

Please sign in to comment.