SHI-Labs / Self-Similarity-Grouping

Self-similarity Grouping: A Simple Unsupervised Cross Domain Adaptation Approach for Person Re-identification (ICCV 2019, Oral)
187 stars 43 forks source link

I ran into a problem when I tried to run source_train.py #25

Closed moyu284 closed 4 years ago

moyu284 commented 4 years ago

Traceback (most recent call last): File "source_train.py", line 315, in main(parser.parse_args()) File "source_train.py", line 241, in main rank_score = evaluator.evaluate(valloader, dataset.val, dataset.val) File "/data0/network/SSG-master/SSG-master/reid/evaluators.py", line 190, in evaluate features, = extract_features(self.model, data_loader, print_freq=self.print_freq) File "/data0/network/SSG-master/SSG-master/reid/evaluators.py", line 28, in extract_features outputs = extract_cnn_feature(model, imgs, for_eval) File "/data0/network/SSG-master/SSG-master/reid/feature_extraction/cnn.py", line 16, in extract_cnn_feature outputs = model(inputs, for_eval)[0] File "/home/dongwh/anaconda3/envs/SSG/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(*input, kwargs) File "/home/dongwh/anaconda3/envs/SSG/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 143, in forward outputs = self.parallel_apply(replicas, inputs, kwargs) File "/home/dongwh/anaconda3/envs/SSG/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 153, in parallel_apply return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)]) File "/home/dongwh/anaconda3/envs/SSG/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 83, in parallel_apply raise output File "/home/dongwh/anaconda3/envs/SSG/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 59, in _worker output = module(*input, *kwargs) File "/home/dongwh/anaconda3/envs/SSG/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in call result = self.forward(input, kwargs) TypeError: forward() takes 2 positional arguments but 3 were given

OasisYang commented 4 years ago

The source_train.py has some problem, but I don't have time to review it. I have removed it and I recommend you to refer this repo..