gidariss / FewShotWithoutForgetting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Training issue with Pytorch1.1, python2.7

Lan1991Xu opened this issue · comments

Hi
Thanks for sharing the code. I have some problems when i run the second stage:
CUDA_VISIBLE_DEVICES=0 python train.py config=miniImageNet_Conv128CosineClassifierGenWeightAttN1.
The erros is : File "/xulan/code/few_shot_withoutforgetting /FewShotWithoutForgetting-master/algorithms/FewShot.py", line 65, in set_tensors
self.tensors['labels_train_1hot'].resize_(labels_train_1hot_size).fill_(0).scatter_(
I check the labels_train_1hot_size, it is [8, 5, tensor([5, 5, 5, 5, 5, 5, 5, 5])]. I think there might be some issue tensor([5, 5, 5, 5, 5, 5, 5, 5]. Do you know what's the problem here. My envirionment is python2.7+pytorch1.1