MCPcopy
hub / github.com/ashleve/lightning-hydra-template / forward

Method forward

src/models/mnist_module.py:79–85  ·  view source on GitHub ↗

Perform a forward pass through the model `self.net`. :param x: A tensor of images. :return: A tensor of logits.

(self, x: torch.Tensor)

Source from the content-addressed store, hash-verified

77 self.val_acc_best = MaxMetric()
78
79 def forward(self, x: torch.Tensor) -> torch.Tensor:
80 """Perform a forward pass through the model `self.net`.
81
82 :param x: A tensor of images.
83 :return: A tensor of logits.
84 """
85 return self.net(x)
86
87 def on_train_start(self) -> None:
88 """Lightning hook that is called when training begins."""

Callers 1

model_stepMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected