In the the forward() of classIW_MaxSquareloss, the code maxpred, argpred = torch.max(prob, 1) will return the values and indices, which means the maxpred is the max values and the argpred is the index.
The next line mask_arg = (maxpred != self.ignore_index), it`s going to select the unignore_index with the mask. Should it be changed like this:mask_arg = (argpred != self.ignore_index)?
In the the
forward()of classIW_MaxSquareloss, the codemaxpred, argpred = torch.max(prob, 1)will return the values and indices, which means themaxpredis the max values and theargpredis the index.The next line
mask_arg = (maxpred != self.ignore_index), it`s going to select the unignore_index with the mask. Should it be changed like this:mask_arg = (argpred != self.ignore_index)?