Hello. I dont know if is a problem with the arhitecture.
But I have a new problem with a loss function, I found an implementation for bootstrap loss`class SoftBootstrappingLoss(nn.Module):
“”"
Loss(t, p) = - (beta * t + (1 - beta) * p) * log§
“”"
def init(self, beta=0.9, reduce=True):
super(SoftBootstrappingLoss, self).init()
self.beta = beta
self.reduce = reduce
def forward(self, input, target):
    target = target.long()
    target = target.view(-1, size_image, size_image)
    # cross_entropy = - t * log(p)
    beta_xentropy = self.beta * F.cross_entropy(input, target, reduce=False)

    # second term = - (1 - beta) * p * log(p)
    bootstrap = - (1.0 - self.beta) * torch.sum(F.softmax(input, dim=1) * F.log_softmax(input, dim=1), dim=1)

    if self.reduce:
        return torch.mean(beta_xentropy + bootstrap)
    return beta_xentropy + bootstrap

criterion = SoftBootstrappingLoss()`
But i obtain negative values for loss.