MCPcopy Create free account
hub / github.com/VisionRush/DeepFakeDefenders / forward

Method forward

toolkit/chelper.py:14–18  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

12 self.adapter = nn.Conv2d(in_channels=6, out_channels=3, kernel_size=3, stride=1, padding=1)
13
14 def forward(self, x):
15 x = self.adapter(x)
16 x = (x - torch.as_tensor(timm.data.constants.IMAGENET_DEFAULT_MEAN, device=x.get_device()).view(1, -1, 1, 1)) / torch.as_tensor(timm.data.constants.IMAGENET_DEFAULT_STD, device=x.get_device()).view(1, -1, 1, 1)
17
18 return self.model(x)
19
20
21class final_model(nn.Module): # Total parameters: 158.64741325378418 MB

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected