class_docstr: Hierarchical Attention Network (RNN baseline model)
docstr: Transform Tensor of targets based on the type of loss
code: def transform_targets(self, targets):
      """Transform Tensor of targets based on the type of loss"""
      if self.hparams.loss_type in [
          "robust",
          "asymmetric",
          "asymmetric_dynamic",
      ]:
          targets = F.one_hot(
              targets.long(), num_classes=self.hparams.cls_num_targets
          )  ## for custom cross entropy we need to encode targets into one hot representation
      elif self.hparams.loss_type == "entropy":
          targets = targets.long()
      else:
          raise NotImplemented
      return targets
  
imports: from turtle import hideturtle
  import pytorch_lightning
  import torch
  import torch.nn.functional
  import torch.nn
  from pytorch_lightning import seed_everything
  from pathlib import Path
  from src.transformer.transformer_utils import *
  from src.transformer.metrics import CorrectedBAcc, CorrectedF1, CorrectedMCC, AUL
  import torchmetrics
label_desc: Use image node_id 5 for calling the FFN obj's underlying member method code with example usage: obj.transform_targets(targets) and returns: targets