I’m not sure if this is a bug.

sup_pred = model(supervised_image)
unsup_pred = model(unsupervised_image)

keeping this constant but in below changing the order:

loss_unsup = lossfn(unsup_pred, unsup_target)
loss_sup = lossfn(sup_pred, sup_target)

vs.

loss_sup = lossfn(sup_pred, sup_target)
loss_unsup = lossfn(unsup_pred, unsup_target)

if I flip these I get widely different results in accuracy during evaluation.  the
opt.zero_grad()
loss.backward()
opt.step()
remain the same. why does this happen?