Hello,
I’m having some trouble creating a custom loss function and would greatly appreciate guidance.
My loss function looks as follows:
class Custom_Loss(_WeightedLoss):
def forward(self, input, target):
    return cust_Loss(input,target)

When attempting to run the code using this loss function python complains that backward() is not defined.  While it’s clear that I haven’t defined a backward() function, I didn’t think it would be necessary since  the loss function I was previously using didn’t define a backward() function either (MultiLabelSoftMarginLoss 95 )
Could anyone either point me to the backward function used by MultiLabelSoftMarginLoss, or recommend a backward function for the Custom_Loss class?
Thanks!