seathiefwang / MGN-pytorch

Reproduction of paper: Learning Discriminative Features with Multiple Granularities for Person Re-Identification
285 stars 108 forks source link

the question of test code's extract_feature #7

Open kunfei1 opened 6 years ago

kunfei1 commented 6 years ago

hellow, the class Trainer's function, extractfeature, in trainer.py has a code,
for (inputs, labels) in loader: ff = torch.FloatTensor(inputs.size(0), 2048).zero
() for i in range(2): if i==1: inputs = self.fliphor(inputs) input_img = inputs.to(self.device) outputs = self.model(input_img) f = outputs[0].data.cpu() ff = ff + f why the feature extraction outputs take twice, What's function of the second progress ,outputs = self.model(input_img)?

gwenzhang commented 5 years ago

do the flip horizontal