class_docstr: `IntentSlotModelDecoder` implements the decoder layer for intent-slot models.
  Intent-slot models jointly predict intent and slots from an utterance.
  At the core these models learn to jointly perform document classification
  and word tagging tasks.
  
  `IntentSlotModelDecoder` accepts arguments for decoding both document
   classification and word tagging tasks, namely, `in_dim_doc` and `in_dim_word`.
  
  Args:
      config (type): Configuration object of type IntentSlotModelDecoder.Config.
      in_dim_doc (type): Dimension of input Tensor for projecting document
      representation.
      in_dim_word (type): Dimension of input Tensor for projecting word
      representation.
      out_dim_doc (type): Dimension of projected output Tensor for document
      classification.
      out_dim_word (type): Dimension of projected output Tensor for word tagging.
  
  Attributes:
      use_doc_probs_in_word (bool): Whether to use intent probabilities for
      predicting slots.
      doc_decoder (type): Document/intent decoder module.
      word_decoder (type): Word/slot decoder module.
class_docstr_tok: ["`","IntentSlotModelDecoder","`","implements","the","decoder","layer","for","intent-slot","models",".","Intent-slot","models","jointly","predict","intent","and","slots","from","an","utterance",".","At","the","core","these","models","learn","to","jointly","perform","document","classification","and","word","tagging","tasks",".","`","IntentSlotModelDecoder","`","accepts","arguments","for","decoding","both","document","classification","and","word","tagging","tasks",",","namely",",","`","in_dim_doc","`","and","`","in_dim_word","`",".","Args",":","config","(","type",")",":","Configuration","object","of","type","IntentSlotModelDecoder.Config",".","in_dim_doc","(","type",")",":","Dimension","of","input","Tensor","for","projecting","document","representation",".","in_dim_word","(","type",")",":","Dimension","of","input","Tensor","for","projecting","word","representation",".","out_dim_doc","(","type",")",":","Dimension","of","projected","output","Tensor","for","document","classification",".","out_dim_word","(","type",")",":","Dimension","of","projected","output","Tensor","for","word","tagging",".","Attributes",":","use_doc_probs_in_word","(","bool",")",":","Whether","to","use","intent","probabilities","for","predicting","slots",".","doc_decoder","(","type",")",":","Document\/intent","decoder","module",".","word_decoder","(","type",")",":","Word\/slot","decoder","module","."]
code: def __init__(
      self,
      config: Config,
      in_dim_doc: int,
      in_dim_word: int,
      out_dim_doc: int,
      out_dim_word: int,
  ) -> None:
      super().__init__(config)
  
      self.use_doc_probs_in_word = config.use_doc_probs_in_word
  
      self.doc_decoder = create_module(
          config.doc_decoder, in_dim=in_dim_doc, out_dim=out_dim_doc
      )
      if self.use_doc_probs_in_word:
          in_dim_word += out_dim_doc
  
      self.word_decoder = create_module(
          config.word_decoder, in_dim=in_dim_word, out_dim=out_dim_word
      )
      log_class_usage(__class__)
  
file_path: pytext/pytext/models/decoders/intent_slot_model_decoder.py
imports: from typing import List, Optional, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from pytext.models.module import create_module
  from pytext.utils.usage import log_class_usage
  from .decoder_base import DecoderBase
  from .mlp_decoder import MLPDecoder
label_desc: Use image node_id 1 to create a new IntentSlotModelDecoder object from inherited base classes: DecoderBase with example: obj = IntentSlotModelDecoder(config, in_dim_doc, in_dim_word, out_dim_doc, out_dim_word)