Qu_Yukun:

e last one or both of


As an additional question for the above one, let’s suppose that we have this.
spat_out = spat_model(spat_data)
temp_out = temp_model(spat_out.detach())
spat_loss = spat_criterion(spat_out, labels)
temp_loss = temp_criterion(temp_out, labels)
loss = spat_loss + temp_loss
loss.backward()
spat_optimizer.step()
temp_optimizer.step()
Basically, the output of the first model becomes the input for the second model. If I create input for the second model by using ‘spat_out.detach()’ to treat it being an independent input, in this case this will backprop on the first model and second model independently? i.e the second model’s gradient is not flowing into the first model.?