Hi,
I have a very basic question about Pytorch graph, if I have a condition like this
if STATEMENT:
     calculate the loss by a Pytorch API like BCELoss
else:
     loss = 0

Does such a condition separate the loss from the graph, and ruin gradients and parameters update?