antspy,
Thanks for your reply!
I’m still a little confused though as I don’t see a backward method defined in binary_cross_entropy 183.
Based on your comments it looks like I should reformulate my loss function as follows:
class Custom_Loss(torch.autograd.Function):
def forward(self, input, target):
    #Do some operations here
    return result

def backward():
    return 'Still not sure what to return here'

Thanks!