yaoyao-liu / meta-transfer-learning

TensorFlow and PyTorch implementation of "Meta-Transfer Learning for Few-Shot Learning" (CVPR2019)
https://lyy.mpi-inf.mpg.de/mtl/
MIT License
731 stars 147 forks source link

some question about resnet-12 #35

Open Sword-keeper opened 4 years ago

Sword-keeper commented 4 years ago

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!

yaoyao-liu commented 4 years ago

Hi,

The numbers of channels in our ResNet-12 are 64, 128, 256, and 512 respectively. https://github.com/yaoyao-liu/meta-transfer-learning/blob/6e2212777aa48ca3ac7f6c7f62fb145fc6fc1bc3/tensorflow/models/resnet12.py#L177-L180

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.

Sword-keeper commented 4 years ago

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?

yaoyao-liu commented 4 years ago

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.