Open johnnynunez opened 2 years ago
Hello @johnnynunez - Thank you for opening the issue!
Next to mse_loss, do you have a list of models for which you'd like to see MaskedTensor support? Likely this won't stop at the loss, but then also apply to operators used during the backward pass.
I can't tell you @cpuhrsch right now. Only that I have had most of the problems you report in the document. I think this repository is a very good idea. I also used masked_select from pytorch but it only works with 1D, my output, target and mask is [32,1,1,1,20,2].
@johnnynunez - Ok sounds good, so to make this issue more concrete, maybe we'll only focus it on mse_loss for now?
@johnnynunez - Ok sounds good, so to make this issue more concrete, maybe we'll only focus it on mse_loss for now?
I think that's right!
@johnnynunez - Sounds good. I edited the title to reflect this.
🚀 The feature, motivation and pitch
Many developers, like myself, use masks in both the prediction output and ground truth to evaluate whether or not an image, for example, is valid for backpropagation.
Alternatives
In my case it is not the same to do x[mask] -> NaN error loss in model x * mask -> 0.0 good Masked tensor(x, mask) - - error F.mse_loss...
Additional context