def get_scores(self, imgs, targets):
    b, _, _, _ = imgs.shape
    batch_size = 32
    total_scores = []
    for i in range(0, b, batch_size):
      scores = self.sub_forward(imgs[i:i+batch_size,:,:,:])
      scores = F.softmax(scores)
      print("targets: ",targets)
      labels = targets[i:i+batch_size]
      print("labels: ",labels)
      labels = labels.long()
      scores = scores[:,labels]
      print(i," scores: ", scores)
      total_scores.append(scores)
      print(i," total_socres: ", total_scores)
    total_scores = torch.stack(total_scores)
    return scores


targets:  tensor([2.])
labels:  tensor([2.])
/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:38: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.
0  scores:  tensor([[0.5671],
        [0.5106],
        [0.5338],
        [0.5548],
        [0.5764],
        [0.5593],
        [0.6007],
        [0.5891],
        [0.5425],
        [0.6006],
        [0.6386],
        [0.5034],
        [0.5746],
        [0.5831],
        [0.5794],
        [0.6206],
        [0.2900],
        [0.4843],
        [0.6075],
        [0.4473],
        [0.5612],
        [0.2937],
        [0.6049],
        [0.5867],
        [0.3828],
        [0.4014],
        [0.4806],
        [0.5595],
        [0.5749],
        [0.5216],
        [0.3748],
        [0.5434]], device='cuda:0')
0  total_socres:  [tensor([[0.5671],
        [0.5106],
        [0.5338],
        [0.5548],
        [0.5764],
        [0.5593],
        [0.6007],
        [0.5891],
        [0.5425],
        [0.6006],
        [0.6386],
        [0.5034],
        [0.5746],
        [0.5831],
        [0.5794],
        [0.6206],
        [0.2900],
        [0.4843],
        [0.6075],
        [0.4473],
        [0.5612],
        [0.2937],
        [0.6049],
        [0.5867],
        [0.3828],
        [0.4014],
        [0.4806],
        [0.5595],
        [0.5749],
        [0.5216],
        [0.3748],
        [0.5434]], device='cuda:0')]
targets:  tensor([2.])
labels:  tensor([])
32  scores:  tensor([], device='cuda:0', size=(32, 0))
32  total_socres:  [tensor([[0.5671],
        [0.5106],
        [0.5338],
        [0.5548],
        [0.5764],
        [0.5593],
        [0.6007],
        [0.5891],
        [0.5425],
        [0.6006],
        [0.6386],
        [0.5034],
        [0.5746],
        [0.5831],
        [0.5794],
        [0.6206],
        [0.2900],
        [0.4843],
        [0.6075],
        [0.4473],
        [0.5612],
        [0.2937],
        [0.6049],
        [0.5867],
        [0.3828],
        [0.4014],
        [0.4806],
        [0.5595],
        [0.5749],
        [0.5216],
        [0.3748],
        [0.5434]], device='cuda:0'), tensor([], device='cuda:0', size=(32, 0))]
targets:  tensor([2.])
labels:  tensor([])
64  scores:  tensor([], device='cuda:0', size=(32, 0))
64  total_socres:  [tensor([[0.5671],
        [0.5106],
        [0.5338],
        [0.5548],
        [0.5764],
        [0.5593],
        [0.6007],
        [0.5891],
        [0.5425],
        [0.6006],
        [0.6386],
        [0.5034],
        [0.5746],
        [0.5831],
        [0.5794],
        [0.6206],
        [0.2900],
        [0.4843],
        [0.6075],
        [0.4473],
        [0.5612],
        [0.2937],
        [0.6049],
        [0.5867],
        [0.3828],
        [0.4014],
        [0.4806],
        [0.5595],
        [0.5749],
        [0.5216],
        [0.3748],
        [0.5434]], device='cuda:0'), tensor([], device='cuda:0', size=(32, 0)), tensor([], device='cuda:0', size=(32, 0))]
targets:  tensor([2.])
labels:  tensor([])
96  scores:  tensor([], device='cuda:0', size=(32, 0))
96  total_socres:  [tensor([[0.5671],
        [0.5106],
        [0.5338],
        [0.5548],
        [0.5764],
        [0.5593],
        [0.6007],
        [0.5891],
        [0.5425],
        [0.6006],
        [0.6386],
        [0.5034],
        [0.5746],
        [0.5831],
        [0.5794],
        [0.6206],
        [0.2900],
        [0.4843],
        [0.6075],
        [0.4473],
        [0.5612],
        [0.2937],
        [0.6049],
        [0.5867],
        [0.3828],
        [0.4014],
        [0.4806],
        [0.5595],
        [0.5749],
        [0.5216],
        [0.3748],
        [0.5434]], device='cuda:0'), tensor([], device='cuda:0', size=(32, 0)), tensor([], device='cuda:0', size=(32, 0)), tensor([], device='cuda:0', size=(32, 0))]