yinboc / few-shot-meta-baseline

Meta-Baseline: Exploring Simple Meta-Learning for Few-Shot Learning, in ICCV 2021
MIT License
615 stars 107 forks source link

how to run on CPU? #44

Open genatin opened 2 years ago

genatin commented 2 years ago

i tryed this in my code:

model = models.load(torch.load(config['load'], map_location='cpu'))

but next i get this error:

Traceback (most recent call last):
File "test_few_shot.py", line 125, in main(config) File "test_few_shot.py", line 77, in main logits = model(x_shot, x_query).view(-1, n_way) File "/hdd/anaconda3/envs/fsl_last/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in call result = self.forward(*input, **kwargs) TypeError: forward() takes 2 positional arguments but 3 were given

pls tell me how to run 'test_few_show' on cpu?