docstr: :param dataset_split: train/valid
  :param sample: is the sample
  :return: the loss, output and the target
docstr_tok: [":","param","dataset_split",":","train\/valid",":","param","sample",":","is","the","sample",":","return",":","the","loss",",","output","and","the","target"]
code: def get_loss(self, sample, dataset_split: str):
      """
      :param dataset_split: train/valid
      :param sample: is the sample
      :return: the loss, output and the target
      """
      data, target = sample
  
      # Forward pass
      with monit.section("Forward pass"):
          output = self.model(data.to(self.device))
      # Move targets to the same device as output
      target = target.to(output.device)
      # Calculate loss
      loss = self.loss_func(
          output.view(target.numel(), -1), target.view(-1)
      )
  
      return loss, output, target
  
imports: from typing import Optional, Set, List
  import torch.nn
  import torch.optim
  import torch.utils.data
  from torch.cuda import amp
  from torch.cuda.amp import GradScaler
  from labml import monit, tracker
  from labml.configs import BaseConfigs, option
  from labml_nn.neox.utils.finetune import FineTuner
label_desc: Use image node_id 1 for calling the TrainerConf obj's underlying member method code with example usage: obj.get_loss(sample, dataset_split) and returns: loss,  output,  target