Hi,
When implementing a custom loss function and backpropagating I get the following error:

ConvNdBackward: expected Variable at argument 0 (got None)

Custom loss function code (all inputs are Variables):
# Implement loss
def custom_loss(S, C, S_prime, C_prime, B):

    
    loss_cover = torch.nn.functional.mse_loss(C, C_prime)
    loss_secret = torch.nn.functional.mse_loss(S, S_prime)
    loss_all = loss_cover + B * loss_secret
    return loss_all

What does this mean and how can I solve it?
Thanks in advance!