mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Pull Request resolved: https://github.com/pytorch/pytorch/pull/106224 Approved by: https://github.com/atalman, https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
50e3f9cbbb
commit
d8e5f2aa6d
@ -1215,8 +1215,8 @@ class {test_classname}(torch.nn.Module):
|
||||
self.seq = torch.nn.Sequential(torch.nn.BatchNorm1d(2, 2))
|
||||
self.linear = torch.nn.Linear(2, 2)
|
||||
self.attr = torch.randn(2)
|
||||
self.register_buffer("attr2", torch.randn(2))
|
||||
self.register_buffer("attr3", torch.ones(2, dtype=torch.int32))
|
||||
self.attr2 = torch.nn.Buffer(torch.randn(2))
|
||||
self.attr3 = torch.nn.Buffer(torch.ones(2, dtype=torch.int32))
|
||||
|
||||
def forward(self, x):
|
||||
return self.linear(self.seq(self.W + self.attr + self.attr2 + self.attr3 + x))
|
||||
|
||||
Reference in New Issue
Block a user