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)?
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)?