MCPcopy Create free account
hub / github.com/pytorch/tutorials / training_step

Method training_step

intermediate_source/mnist_train_nas.py:97–101  ·  view source on GitHub ↗
(self, batch, batch_idx)

Source from the content-addressed store, hash-verified

95 return F.log_softmax(x, dim=1)
96
97 def training_step(self, batch, batch_idx):
98 x, y = batch
99 logits = self(x)
100 loss = F.nll_loss(logits, y)
101 return loss
102
103 def validation_step(self, batch, batch_idx):
104 x, y = batch

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected