katerakelly/pytorch-maml

Maybe dimension mistake

PanPanZou opened this issue · 0 comments

Thanks for your nice implementation. But I meet this mistake when I sh train-omniglot-20way-1shot.sh ,is there any dimension dismatch? I don't know how to fix it. It's much appreciated if anyone can help me.
Traceback (most recent call last):
File "maml.py", line 230, in
main()
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "maml.py", line 227, in main
learner.train(exp)
File "maml.py", line 151, in train
mt_loss, mt_acc, mv_loss, mv_acc = self.test()
File "maml.py", line 113, in test
tloss, tacc = evaluate(test_net, train_loader)
File "/home/src-plot/score.py", line 30, in evaluate
loss += l.data.cpu().numpy()[0]
IndexError: too many indices for array