imaluengo:

nn.BCELoss


Does it handle the variable length issue?
The examples I mentioned was bad and let me try to rephrase to a better one. For example, the first pair may be pred [[0.2, 0.8], [0.9, 0.1]] and target [1, 1], while the second pair may be pred [[0.4, 0.6], [0.7, 0.3], [0.9, 0.1]] and target [1,0, 1]. I padded them to the same length but I am not sure how I should handle the variable length issue when it comes to the loss.