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

Queaten about SS for pytorch

xiaobeikankan opened this issue · comments

sorry for this issue.
I can't find the SS_N implementation. Did you haven't realized this part yet?

Thanks for your interest in our work.

The implementation for SS operations is in models/conv2d_mtl.py file. E.g.,

def forward(self, inp):
new_mtl_weight = self.mtl_weight.expand(self.weight.shape)
new_weight = self.weight.mul(new_mtl_weight)
if self.bias is not None:
new_bias = self.bias + self.mtl_bias
else:
new_bias = None
return F.conv2d(inp, new_weight, new_bias, self.stride,
self.padding, self.dilation, self.groups)