nn.CrossEntropyLoss: - optimizer not updating weights

You are most likely detaching the computation graph in your model somewhere so could you post the model definition, please?

@blackbirdbarber you do not need to set input.requires_grad = True and it should not fix this issue.

1 Like