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

Method forward

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

Source from the content-addressed store, hash-verified

132 return nn.Sequential(*layers)
133
134 def forward(self, x):
135 out = F.relu(self.bn1(self.conv1(x)))
136 out = self.layer1(out)
137 out = self.layer2(out)
138 out = self.layer3(out)
139 # out = F.avg_pool2d(out, 8)
140 # out = out.view(out.shape[0], -1)
141 out = self.avgpool(out)
142 out = torch.flatten(out, 1)
143 out = self.linear(out)
144 return out
145
146
147def resnet18(in_dims, out_dims):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected