class_docstr: Position-wise feed-forward network with activation.
  
  .. math::
  
      activation(XW_1 + b_1)W_2 + b_2
  
  :math:`W_1`: (batch_size, d, inner_dim)
  :math:`W_2`: (batch_size, inner_dim, out_dim)
class_docstr_tok: ["Position-wise","feed-forward","network","with","activation",".","..","math",":",":","activation","(","XW_1","+","b_1",")","W_2","+","b_2",":","math",":","`","W_1","`",":","(","batch_size",",","d",",","inner_dim",")",":","math",":","`","W_2","`",":","(","batch_size",",","inner_dim",",","out_dim",")"]
code: def __init__(
      self,
      inner_dim: int = 32,  # W1: (batch_size, d, inner_dim)
      out_dim: int = 32,  # W2: (batch_size, inner_dim, out_dim)
      act_type: str = "softrelu",
      dropout: float = 0.0,
      **kwargs,
  ) -> None:
      super().__init__(**kwargs)
  
      self.inner_dim = inner_dim
      self.out_dim = out_dim
      self.dropout = dropout
      self.act_type = act_type
  
      with self.name_scope():
          self.mlp = mx.gluon.nn.HybridSequential()
          self.mlp.add(
              mx.gluon.nn.Dense(
                  units=self.inner_dim,
                  use_bias=True,
                  activation=self.act_type,
                  flatten=False,
              )
          )
          if self.dropout > 0.0:
              self.mlp.add(mx.gluon.nn.Dropout(self.dropout))
          self.mlp.add(
              mx.gluon.nn.Dense(
                  units=out_dim, use_bias=True, flatten=False
              )
          )
  
imports: from typing import Dict, Optional, Tuple
  import mxnet
  from mxnet.gluon import HybridBlock
  from gluonts.mx import Tensor
label_desc: Use image node_id 1 to create a new TransformerFeedForward object from inherited base classes: HybridBlock with example: obj = TransformerFeedForward(inner_dim, out_dim, act_type, dropout)