Hi I am reproducing a paper–When Image Denoising Meets High-Level Vision Tasks: A Deep Learning Approach-- It said that a Object Detection task and a Denoising task can train jointly
suppose I have 2 network :net_denoiser,net_detector
trainer_dt = Trainer(net_detector.collect_paramaters())
trainer_dn = Trainer(net_denoiser.collect_paramaters())
for(epoch):
with autograde.record()
dt_out = net_detector(imgs)
dn_out = net_denoiser(imgs)
dt_loss = dt_loss(detection_out,detection_label)
dn_loss = dn_loss2(denoting_out,original image)
total_loss = dt_loss+dn_loss
total_loss.backward()
trainer_dt.step()
trainer_dn.step()
I am confused that:
am I right?
commonly a backward are followed by a trainer.step() operation.
I have never seen that a backward() operation followed by 2 trainer.step() operations.
If I have 2 or more backward() and trainer in a certain order(like GANs) . How to ensure that they can work properly ?
Thank you for your time and consideration.