MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / forward

Method forward

tests/unit/alexnet_model.py:42–46  ·  view source on GitHub ↗
(self, x, y)

Source from the content-addressed store, hash-verified

40 self.loss_fn = nn.CrossEntropyLoss()
41
42 def forward(self, x, y):
43 x = self.features(x)
44 x = x.view(x.size(0), -1)
45 x = self.classifier(x)
46 return self.loss_fn(x, y)
47
48
49class AlexNetPipe(AlexNet):

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
loss_fnMethod · 0.45

Tested by

no test coverage detected