facebookresearch / ConvNeXt-V2

Code release for ConvNeXt V2 model
Other
1.48k stars 117 forks source link

The official pre-training weights does not match the parameters of the model #47

Open morningbearscau opened 1 year ago

morningbearscau commented 1 year ago

The official re-training weights: model: OrderedDict downsample_layers.0.0.bias: Tensor with shape (128,) downsample_layers.0.0.weight: Tensor with shape (128, 3, 4, 4) downsample_layers.0.1.bias: Tensor with shape (128,) downsample_layers.0.1.weight: Tensor with shape (128,) downsample_layers.1.0.bias: Tensor with shape (128,) downsample_layers.1.0.weight: Tensor with shape (128,) downsample_layers.1.1.bias: Tensor with shape (256,) downsample_layers.1.1.weight: Tensor with shape (256, 128, 2, 2) downsample_layers.2.0.bias: Tensor with shape (256,) downsample_layers.2.0.weight: Tensor with shape (256,) downsample_layers.2.1.bias: Tensor with shape (512,) downsample_layers.2.1.weight: Tensor with shape (512, 256, 2, 2) downsample_layers.3.0.bias: Tensor with shape (512,) downsample_layers.3.0.weight: Tensor with shape (512,) downsample_layers.3.1.bias: Tensor with shape (1024,) downsample_layers.3.1.weight: Tensor with shape (1024, 512, 2, 2) ..... The model parameters: mask_token: Tensor with shape (1, 512, 1, 1) encoder.downsample_layers.0.0.weight: Tensor with shape (128, 3, 4, 4) encoder.downsample_layers.0.0.bias: Tensor with shape (128,) encoder.downsample_layers.0.1.weight: Tensor with shape (128,) encoder.downsample_layers.0.1.bias: Tensor with shape (128,) encoder.downsample_layers.1.0.ln.weight: Tensor with shape (128,) encoder.downsample_layers.1.0.ln.bias: Tensor with shape (128,) encoder.downsample_layers.1.1.kernel: Tensor with shape (4, 128, 256) encoder.downsample_layers.1.1.bias: Tensor with shape (1, 256) encoder.downsample_layers.2.0.ln.weight: Tensor with shape (256,) encoder.downsample_layers.2.0.ln.bias: Tensor with shape (256,) encoder.downsample_layers.2.1.kernel: Tensor with shape (4, 256, 512) encoder.downsample_layers.2.1.bias: Tensor with shape (1, 512) encoder.downsample_layers.3.0.ln.weight: Tensor with shape (512,) encoder.downsample_layers.3.0.ln.bias: Tensor with shape (512,) encoder.downsample_layers.3.1.kernel: Tensor with shape (4, 512, 1024) encoder.downsample_layers.3.1.bias: Tensor with shape (1, 1024)

H-Hui2277 commented 1 year ago

The encoder is in the fcmae model to pretrain the ConvNeXtV2 model. If you are training your tasks by pretrained weights in fcame, you just need to use the encoder weights to init the model. Or you shuld use the fine-tune trained models.