Hi, I have two loss functions whose return value has to be variables of cpu tensor and gpu tensor, respectively. Therefore, I cannot do:
loss = loss1 + loss2
loss.backward()

because loss1.data is a cpu tensor and loss2.data is a gpu tensor. How to correctly do back-propagation? Thanks!