Info about binary cross entropy with logits

The function torch.nn.functional.binary_cross_entropy_with_logits actually returns a call to the function torch.binary_cross_entropy_with_logits. But I can’t find any information about it. It doesn’t have any docstring either. What is the actual code that is called and how is it called?

Hi, this is pretty old question but I think I found its definition:

Hi,

My problem with using binary cross entropy is due to input and target shape.
input size is [n,m] however target size is [n]. By upsampling target size to [n,m], I got “zero-Devision-Error-scaled” error in backward. Any help please?