def create_metanet(self): metanet = MetaWideResNet(num_classes=params.n_classes, depth=params.depth, widen_factor=params.widen_factor).to(self.device) metanet.load_state_dict(self.model.state_dict()) return metanet
def create_metanet(self): metanet = MetaWideResNet(num_classes=params.n_classes, depth=params.depth, with_fc=False, widen_factor=params.widen_factor).to(self.device) metanet.load_state_dict(self.model.state_dict()) meta_sgd = MetaSGD(metanet, **self.params.meta_optim) return metanet, meta_sgd