feature_loss_mat is calculated using TripletMarginLoss, and the dimensions of the input are (64, 1, H, W). (if batch size is 64)
At this time, the calculated dimension of feature_loss_mat is (64, H, W).
And finally, to calculate the loss, it is multiplied by mask_ap, and the dimension of mask_ap is (64,1,H,W).
In my opinion, the dimensions of feature_loss_mat and mask_ap should be the same. Is the difference between the two dimensions intended?
I have a question about the dimensions of the feature_loss_mat calculated within resnet.forward.
feature_loss_mat is calculated using TripletMarginLoss, and the dimensions of the input are (64, 1, H, W). (if batch size is 64) At this time, the calculated dimension of feature_loss_mat is (64, H, W).
And finally, to calculate the loss, it is multiplied by mask_ap, and the dimension of mask_ap is (64,1,H,W).
In my opinion, the dimensions of feature_loss_mat and mask_ap should be the same. Is the difference between the two dimensions intended?