docstr: Parameters
  ----------
  use_pooler
      Whether to use pooler
  classifier_activation
  extract_feature
      Whether to extract the feature
  pooler_activation
  **kwargs
docstr_tok: ["Parameters","--","--","--","--","--","use_pooler","Whether","to","use","pooler","classifier_activation","extract_feature","Whether","to","extract","the","feature","pooler_activation","*","*","kwargs"]
code: def __init__(
      self,
      use_pooler: bool = False,
      classifier_activation: bool = False,
      extract_feature: bool = False,
      pooler_activation="tanh",
      **kwargs,
  ):
      """
  
      Parameters
      ----------
      use_pooler
          Whether to use pooler
      classifier_activation
      extract_feature
          Whether to extract the feature
      pooler_activation
      **kwargs
      """
      super().__init__(**kwargs)
      assert (
          self._src_vocab_size == self._tgt_vocab_size
      ), "Vocab size mismatch between encoder and decoder"
      self._vocab_size = self._src_vocab_size
      self.extract_feature = extract_feature
      self.use_pooler = use_pooler
      self.classifier_activation = classifier_activation
      if not extract_feature:
          if self.tie_weights:
              self.tgt_final_layer = nn.Dense(
                  units=self._tgt_vocab_size,
                  in_units=self.dec_units,
                  flatten=False,
                  use_bias=False,
                  dtype=self._dtype,
              )
              self.tgt_final_layer.weight = self.tgt_embed_layer.weight
          else:
              self.tgt_final_layer = nn.Dense(
                  units=self._tgt_vocab_size,
                  in_units=self.dec_units,
                  flatten=False,
                  weight_initializer=self.weight_initializer,
                  use_bias=False,
                  dtype=self._dtype,
              )
      elif use_pooler and classifier_activation:
          # Construct pooler
          self.pooler = nn.Dense(
              units=self.units,
              in_units=self.units,
              flatten=False,
              activation=pooler_activation,
              weight_initializer=self.weight_initializer,
              bias_initializer=self.bias_initializer,
              dtype=self._dtype,
          )
  
imports: import os
  from typing import Tuple, List
  import mxnet
  from mxnet import use_np
  from mxnet.gluon import nn
  from .base import BACKBONE_REGISTRY
  from .transformer import TransformerModel
  from ..base import get_model_zoo_home_dir, get_repo_model_zoo_url, get_model_zoo_checksum_dir
  from ..utils.misc import download, load_checksum_stats
  from ..utils.config import CfgNode
  from ..utils.registry import Registry
  from ..data.tokenizers import HuggingFaceByteBPETokenizer
label_desc: Use image node_id 1 to create a new BartModel object from inherited base classes: TransformerModel with example: obj = BartModel(use_pooler, classifier_activation, extract_feature, pooler_activation)