for i in range(real_batch_size):
confidance_gt = ground_truth_point[i, 0, :, :]
confidance_gt = confidance_gt.view(1, self.p.grid_y, self.p.grid_x)
hard_loss = hard_loss +\
torch.sum( (1-confidance[i][confidance_gt==1])**2 )/\
(torch.sum(confidance_gt==1)+1)
target = confidance[i][confidance_gt==0]
hard_loss = hard_loss +\
torch.sum( ( target[target>0.01] )**2 )/\
(torch.sum(target>0.01)+1)
node = hard_sampling.sampling_node(loss = hard_loss.cpu().data, data = data_list[i], previous_node = None, next_node = None)
self.hard_sampling.insert(node)
you add the hardloss along batches, and insert every single node use the added loss.
Is it right? Maybe should not use the added loss
` hard_loss = 0
you add the hardloss along batches, and insert every single node use the added loss.
Is it right? Maybe should not use the added loss