yaoyao-liu / meta-transfer-learning

TensorFlow and PyTorch implementation of "Meta-Transfer Learning for Few-Shot Learning" (CVPR2019)

Home Page:https://lyy.mpi-inf.mpg.de/mtl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

some question about resnet-12

Sword-keeper opened this issue · comments

Hi I have some questions about resnet-12 . I have found some models which also use resnet-12 to extract feature. However,I found that your's and other's resnet-12 are not exactly same. For example, the layers's channel in your resnet is 160,320,640. But others may follows the resnet setting. 128,256,512. Could you tell me why you design like this? I tried to search some information about resnet-12 on the Internet. But i can't found. Could you give me some information about resnet-12 ? Thank you!

Hi,

The numbers of channels in our ResNet-12 are 64, 128, 256, and 512 respectively.

weights = self.construct_residual_block_weights(weights, 3, 3, 64, conv_initializer, dtype, 'block1')
weights = self.construct_residual_block_weights(weights, 3, 64, 128, conv_initializer, dtype, 'block2')
weights = self.construct_residual_block_weights(weights, 3, 128, 256, conv_initializer, dtype, 'block3')
weights = self.construct_residual_block_weights(weights, 3, 256, 512, conv_initializer, dtype, 'block4')

In PyTorch version, we use ResNet-25 instead of ResNet-12, following FEAT. We'll provide a ResNet-12 PyTorch implementation later. If you hope to implement ResNet-12 yourself, you may follow MetaOptNet and DeepEMD.

Hi I have another question. In resnet's paper, the first conv layer's kernel size is 7. However in your torch code, the first conv layer's kernel size is 3. What's more, I also found some code which use resnet and they set first conv layer's kernel size is 3 or even delete this layer . Could you tell me what's the reason you change it?

For the backbone in the PyTorch implementation, we follow FEAT. That means, we're using exactly the same hyperparameters (e.g., kernel size) as FEAT's implementation. You may directly refer to their paper for details: Supplementary Material C, Implementation Details.