KovenYu / MAR

Pytorch code for our CVPR'19 (oral) work: Unsupervised person re-identification by soft multilabel learning
https://kovenyu.com/publication/2019-cvpr-mar/
315 stars 83 forks source link

set_storage_offset error #28

Closed sunxia233 closed 4 years ago

sunxia233 commented 4 years ago

HI thank you for share the code.But I ran into a problem while running the code.I reduced the batchsize to 184,

==>>[2019-10-30 19:22:50] [Epoch=000/020] Stage 1, [Need: 00:00:00] initializing centers/threshold ... loaded ml from data/ml_Market.dat initializing centers done. initializing threshold done. Traceback (most recent call last): File "src/main.py", line 46, in main() File "src/main.py", line 35, in main meters_trn = trainer.train_epoch(source_loader, target_loader, epoch) File "/home/sunxia/MAR/src/trainers.py", line 123, in train_epoch multilabels = F.softmax(featurestarget.mm(agents.detach().t()*self.args.scala_ce), dim=1) RuntimeError: set_storage_offset is not allowed on Tensor created from .data or .detach()

Is this a problem that my memory is not big enough?

sunxia233 commented 4 years ago

sorry ,I got it!My original pytorch version is 1.1.0 when i change the pytorch version to 1.0.0,its work

pzhren commented 4 years ago

multilabels = F.softmax(featurestarget.mm(agents.t()*self.args.scala_ce), dim=1)