code: def __init__(
      self,
      input_size: int,
      size: int,
      bn_momentum: float = 0.1,
      bn_epsilon: float = 1e-3,
      bn_virtual_bs: int = None,
      entmax_mode: str = "sparsemax",
      entmax_alpha: float = 1.5,
  ):
      super().__init__()
      self.input_size = input_size
      self.size = size
      self.entmax_mode = entmax_mode
      if entmax_mode == "adaptive":
          self.register_buffer(
              "trainable_alpha",
              torch.tensor(entmax_alpha, requires_grad=True),
          )
      else:
          self.trainable_alpha = entmax_alpha
  
      if self.entmax_mode == "sparsemax":
          self.entmax_module = Sparsemax()
      elif self.entmax_mode == "entmax15":
          self.entmax_module = Entmax15()
      else:
          self.entmax_module = EntmaxBisect(alpha=self.trainable_alpha)
  
      self.feature_block = FeatureBlock(
          input_size,
          size,
          bn_momentum=bn_momentum,
          bn_epsilon=bn_epsilon,
          bn_virtual_bs=bn_virtual_bs,
          apply_glu=False,
      )
  
imports: from typing import List, Optional, Tuple
  import torch
  import torch.nn
  from ludwig.modules.normalization_modules import GhostBatchNormalization
  from ludwig.utils.entmax import Entmax15, EntmaxBisect, Sparsemax
  from ludwig.utils.torch_utils import LudwigModule
label_desc: Use image node_id 1 to create a new AttentiveTransformer object from inherited base classes: LudwigModule with example: obj = AttentiveTransformer(input_size, size, bn_momentum, bn_epsilon, bn_virtual_bs, entmax_mode, entmax_alpha)