Hi Talha!



 talhaanwarch:

How can I pass the y_pred and y_actual to this criterion.


For a multi-label, multi-class classification problem,
BCWEithLogitsLoss is an appropriate loss function.  For it, your
y_pred and y_actual should have the same shape, namely
[nBatch, nClass].
Whether the output of your model, y_pred, has the same shape
as the input to your model will depend on your use case – it doesn’t
have to.
(Note that y_pred and y_actual can have additional dimensions.
For example, if you were performing a multi-label segmentation of
an image, they would have shape [nBatch, nClass, H, W].)
Best.
K. Frank