Thank you very much for your reply.
My work is to train two tasks, which are related but different. In fact,I can say the relation between the two tasks is hierarchical. I planed to train taskone( which is task D) firstly and save the model, and then do some modification to the model D to train task two(which is task C).
and the code
“self.resnet = model” is what I try to init the resnet.