Why do we multiply loss with a constant sometimes? I have seen people use
loss = nn.functional.binary_cross_entropy_with_logits(logits, labels)
loss *= labels.size(1)
or sometimes
loss = nn.functional.binary_cross_entropy_with_logits(logits, labels)
loss *= labels.size(0)
I am not sure the difference between using no constant multiply with loss, multiply with num of classes, multiply with batch size. Any body can give me an explanation ?