def METHOD_NAME(self):
    error = 0
    lc = torch.tensor(self.labels.shape[0] * self.labels.shape[1]
                      * self.labels.shape[2])
    inw = torch.sum(self.labels)
    weight_in = inw / lc
    weight = torch.abs(self.labels - weight_in)
    lamda = 1 / torch.mean(weight)
    for preds in self.intermediate_preds_list:
        error += lamda * torch.mean(
            self.error_term(preds, self.labels) * weight)
    error /= len(self.intermediate_preds_list)
    return error