Passing Variable in BCE loss function

If you don’t plan on computing the gradients for x, you don’t need to do anything :slight_smile:
The parameters inside the model already require gradients and that will be enough for the autograd to know when to start recording the graph.