def init_protonet(opt): ''' Initialize the ProtoNet ''' model = ProtoNet() model = model.cuda() if opt.cuda else model return model
def init_protonet(opt): ''' Initialize the ProtoNet ''' if opt.dataset == 'omniglot': model = ProtoNet() elif opt.dataset == 'mini_imagenet': model = ProtoNet(x_dim=3) model = model.cuda() if opt.cuda else model return model
def create_model(): protonet_model = ProtoNet() if use_gpu: protonet_model = protonet_model.cuda() return protonet_model