docstr: Set up model.
docstr_tok: ["Set","up","model","."]
code: def __init__(self, opt, shared=None):
      """
      Set up model.
      """
  
      super().__init__(opt, shared)
      self.use_knowledge = opt.get("use_knowledge", False)
      if self.use_knowledge:
          self.opt["use_memories"] = True
      self.chosen_sentence = (
          opt.get("chosen_sentence", False) and self.use_knowledge
      )
      self.knowledge_dropout = opt.get("knowledge_dropout", 0)
      self.knowledge_truncate = opt.get("knowledge_truncate", 50)
  
file_path: ParlAI/projects/wizard_of_wikipedia/wizard_transformer_ranker/wizard_transformer_ranker.py
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.agents.transformer.transformer import TransformerRankerAgent
  from .wizard_dict import WizardDictAgent
  from parlai.utils.io import PathManager
  import numpy
  import torch
label_desc: Use image node_id 3 to create a new WizardTransformerRankerAgent object from inherited base classes: TransformerRankerAgent with example: obj = WizardTransformerRankerAgent(opt, shared)