Open mengruwg opened 3 years ago
If you set mtl=True
in the following line:
https://github.com/yaoyao-liu/meta-transfer-learning/blob/fe189c96797446b54a0ae1c908f8d92a6d3cb831/pytorch/models/resnet_mtl.py#L165
It means that you're using _ConvNdMtl
function, so
https://github.com/yaoyao-liu/meta-transfer-learning/blob/fe189c96797446b54a0ae1c908f8d92a6d3cb831/pytorch/models/conv2d_mtl.py#L45
i.e., the convolution weights are frozen.
You may directly load normal checkpoints to MTL models like this: https://github.com/yaoyao-liu/meta-transfer-learning/blob/fe189c96797446b54a0ae1c908f8d92a6d3cb831/pytorch/trainer/meta.py#L69
If you have any further questions, feel free to ask.
Thanks for your detailed reply. I can completely understand the experiment now.
在 2021-05-12 17:26:14,"Yaoyao Liu" @.***> 写道:
Reopened #52.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.
during pythorch version new_weight = self.weight.mul(new_mtl_weight)(line 95 in conv2d_mtl.py) self.weight = Parameter(torch.Tensor(out_channels, in_channels // groups, *kernel_size))(line 42 in conv2d_mtl.py) How to load pretrained and fix feature encoder weights during SS process?