class_docstr: PyTorch Lightning trainer for cnntransformer.
  
  Args:
      feature_extractor (torch.nn.Sequential, optional): the feature extractor network.
      optimizer (dict): optimizer parameters.
      lr_milestones (list): list of epoch indices. Must be increasing.
      lr_gamma (float): multiplicative factor of learning rate decay.
docstr: Compute loss, top1 and top5 accuracy for a given batch.
docstr_tok: ["Compute","loss",",","top1","and","top5","accuracy","for","a","given","batch","."]
code: def compute_loss(self, batch, split_name="valid"):
      """Compute loss, top1 and top5 accuracy for a given batch."""
      x, y = batch
      y_hat = self.forward(x)
  
      loss, _ = losses.cross_entropy_logits(y_hat, y)
      top1, top5 = losses.topk_accuracy(y_hat, y, topk=(1, 5))
      top1 = top1.double().mean()
      top5 = top5.double().mean()
  
      log_metrics = {
          f"{split_name}_loss": loss,
          f"{split_name}_top1_acc": top1,
          f"{split_name}_top5_acc": top5,
      }
  
      return loss, log_metrics
  
imports: import pytorch_lightning
  import torch
  import torch.nn
  from sklearn.metrics import accuracy_score
  from kale.predict import losses
label_desc: Use image node_id 3 for calling the CNNTransformerTrainer obj's underlying member method code with example usage: obj.compute_loss(batch, split_name) and returns: loss,  log_metrics