code: def forward(self, inputs, prior_scales):
      # shape notation
      # i_s: input_size
      # s: size
      # b_s: batch_size
  
      # inputs shape [b_s, i_s], prior_scales shape [b_s, s]
      hidden = self.feature_block(inputs)  # [b_s, s]
      hidden = hidden * prior_scales  # [b_s, s]
  
      # removing the mean to try to avoid numerical instability
      # https://github.com/tensorflow/addons/issues/2314
      # https://github.com/tensorflow/tensorflow/pull/21183/files
      # In (Arik and Pfister, 2019), they call the logits z.
      # The mean(logits) can be substracted from logits to make the algorithm
      # more numerically stable. the instability in this algorithm comes mostly
      # from the z_cumsum. Substacting the mean will cause z_cumsum to be close
      # to zero.
      # hidden = hidden - tf.math.reduce_mean(hidden, axis=1)[:, tf.newaxis]
      return self.entmax_module(hidden)
  
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 2 for calling the AttentiveTransformer obj's underlying member method code with example usage: obj.forward(inputs, prior_scales) and returns: self