hmmm that is interesting, what do you mean by How are you checking the “updated channels” ?
I guess I am not, but I am also not sure how should I do it, can you please give me a hint?
here is a psedo code of my code:
prediction= F.sigmoid(self.deeplabv(inputs)['out']) # self.deeplab is the pytorch deeplab model
batch = prediction.shape[0]//2
output_1 = prediction[:batch]                 
output_2 = prediction[batch:2*batch]
output_1_1 = output_1[selecting_index_1].unsqueeze(1)
output_1_2 = output_2[selecting_index_2].unsqueeze(1)
self.model.eval()
output_1_1_1= self.model(torch.mul(inputs[:batch]         ,output_1_1 ) )
output_1_2_1= self.model(torch.mul(inputs[batch:2*batch]  ,output_1_2 ) )
loss = self.loss(output_1_1_1,mask_1) + self.loss(output_1_2_1,mask_2)