Screenshot 2020-10-04 at 22.56.541818×320 47.2 KB
Hi I am new to pytorch, this is a piece of code. Basiclly net and fc_net is the nets we want to train. The net_input, fc_net_input are generated by other Network let call it net_pretrain. I don’t quite understand why we need to detach().clone() here. since the optimizer does not include parameter of net_pretrain