MCPcopy Create free account
hub / github.com/pytorch/pytorch / eval_step

Function eval_step

scripts/release_notes/classifier.py:277–281  ·  view source on GitHub ↗
(batch, model, loss)

Source from the content-addressed store, hash-verified

275
276@torch.no_grad()
277def eval_step(batch, model, loss):
278 inpt, targets = batch
279 output = model(inpt)
280 l = loss(output, targets)
281 return l
282
283
284def balance_dataset(dataset: List):

Callers 1

trainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…