@donalee
The location of the problem is line 149 of the dtw_loss() funtion of the 'model.py' file.
def dtw_loss(self, out, wlabel): h = self.fc(out).squeeze(dim=2) dscore = torch.sigmoid(self.fc(out).squeeze(dim=2)) with torch.no_grad(): # Activation map actmap = h actmin = torch.min(actmap, dim=1)[0] actmap = actmap - actmin.unsqueeze(dim=1) actmax = torch.max(actmap, dim=1)[0] actmap = actmap / actmax.unsqueeze(dim=1)
Min-Max normalization should be (actmap - actmin)/(actmax - actmin), but in the code is (actmap - actmin)/actmax.
@donalee
The location of the problem is line 149 of the dtw_loss() funtion of the 'model.py' file.
def dtw_loss(self, out, wlabel): h = self.fc(out).squeeze(dim=2) dscore = torch.sigmoid(self.fc(out).squeeze(dim=2)) with torch.no_grad(): # Activation map actmap = h actmin = torch.min(actmap, dim=1)[0] actmap = actmap - actmin.unsqueeze(dim=1) actmax = torch.max(actmap, dim=1)[0] actmap = actmap / actmax.unsqueeze(dim=1)Min-Max normalization should be (actmap - actmin)/(actmax - actmin), but in the code is (actmap - actmin)/actmax.