yes!
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-3-c142911ed308> in <module>
     43     outputs = network(inputs)
     44 
---> 45     loss = custom_loss(delta)(outputs, targets)
     46     loss.backward()
     47     optimizer.step()

<ipython-input-3-c142911ed308> in loss(y_pred, y_true)
     21         y_pred_clamped = torch.clamp(y_pred, 1e-8, 1 - 1e-8)
     22         log_likelihood = y_true * torch.log(y_pred_clamped)
---> 23         return torch.sum(-log_likelihood * delta)
     24     return loss
     25 

RuntimeError: The size of tensor a (4) must match the size of tensor b (32) at non-singleton dimension 1