Check on target being between 0-1 for binary cross entropy loss #87373
Labels
actionable
module: nn
Related to torch.nn
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
📚 The doc issue
In the docstring of
https://pytorch.org/docs/stable/_modules/torch/nn/functional.html#binary_cross_entropy
it is mentioned thattarget: Tensor of the same shape as input with values between 0 and 1.
However there is no such check added anywhere.Suggest a potential alternative/fix
Add a check similar to the one for the input here
cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345 @saketh-are
The text was updated successfully, but these errors were encountered: