If the input tensot of torch.nn.functional.binary_cross_entropy is zero , and the target tensor is 1.0, the output will be 100.
Here is my code:
input=torch.tensor(0.0)
target=torch.tensor(1.0)
loss=F.binary_cross_entropy(input,target)
print(loss) #tensor(100.)
so I want to know how does the function proceed when the input is zero, cause in the math formula, log(0.0) will cause a math domain problem , but this does not happen in the pytorch.
I am looking forward to hearing from you