(self, output)
| 101 | self.camids = [] |
| 102 | |
| 103 | def update(self, output): # called once for each batch |
| 104 | feat, pid, camid = output |
| 105 | self.feats.append(feat.cpu()) |
| 106 | self.pids.extend(np.asarray(pid)) |
| 107 | self.camids.extend(np.asarray(camid)) |
| 108 | |
| 109 | def compute(self): # called after each epoch |
| 110 | feats = torch.cat(self.feats, dim=0) |