MCPcopy Create free account
hub / github.com/CausalLearning/robust-unlearnable-examples / forward

Method forward

models/resnet.py:87–96  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

85 return nn.Sequential(*layers)
86
87 def forward(self, x):
88 out = F.relu(self.bn1(self.conv1(x)))
89 out = self.layer1(out)
90 out = self.layer2(out)
91 out = self.layer3(out)
92 out = self.layer4(out)
93 out = self.avgpool(out)
94 out = torch.flatten(out, 1)
95 out = self.linear(out)
96 return out
97
98 def feature_extract(self, x):
99 out = F.relu(self.bn1(self.conv1(x)))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected