MCPcopy Index your code
hub / github.com/pytorch/tutorials / loss_fn

Function loss_fn

intermediate_source/per_sample_grads.py:47–48  ·  view source on GitHub ↗
(predictions, targets)

Source from the content-addressed store, hash-verified

45 return output
46
47def loss_fn(predictions, targets):
48 return F.nll_loss(predictions, targets)
49
50
51######################################################################

Callers 13

amp_recipe.pyFile · 0.85
polynomial_nn.pyFile · 0.85
trainingyt.pyFile · 0.85
train_one_epochFunction · 0.85
trainFunction · 0.85
testFunction · 0.85
train_loopFunction · 0.85
test_loopFunction · 0.85
compute_gradFunction · 0.85
compute_lossFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_loopFunction · 0.68