def METHOD_NAME(self, predictions, batch, stage=True):
    "Given the network predictions and targets computed the binary CE"
    predictions, lens = predictions
    targets, lens = batch.target
    targets = targets.to(predictions.device)
    predictions = predictions[:, : targets.shape[-1], 0]
    loss = self.hparams.compute_BCE_cost(
        torch.nn.BCEWithLogitsLoss(reduction="none"),
        predictions,
        targets,
        lens,
    )
    # compute metrics
    self.binary_metrics.append(
        batch.id, torch.sigmoid(predictions), targets
    )
    return loss