gidariss / FewShotWithoutForgetting

MIT License
519 stars 110 forks source link

Training issue with Pytorch1.1, python2.7 #19

Open Lan1991Xu opened 5 years ago

Lan1991Xu commented 5 years ago

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_train1hot'].resize(labels_train_1hotsize).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