@Yakirs Maybe you can set reduction='none'. For example,
import torch
import torch.nn as nn

y = torch.rand(4, 10, 10)
y_true = torch.randint(0, 1, size=(4, 10, 10))
loss = nn.BCELoss(reduction='none')
loss(y, y_true).shape

> torch.Size([4, 10, 10])