Yes that’s another one that is readily understood. The loss object is tied to x through the out = lin(x) line.
My example…
criterion = nn.CrossEntropyLoss()
…
loss = criterion(outputs, labels)
had the loss set to some generic instance of nn.CrossEntropyLoss without
any relation to the model or my equivalent of x to use your nomenclature.
Thanks!
Chris