class_docstr: Pytorch Hub interface for generating sequences from a pre-trained
  multichannel language model.
class_docstr_tok: ["Pytorch","Hub","interface","for","generating","sequences","from","a","pre-trained","multichannel","language","model","."]
code: def __init__(self, cfg, task, models):
      super().__init__(cfg, task, models)
      self.cfg = cfg
      self.task = task
      self.models = nn.ModuleList(models)
      self.src_dicts = task.source_dictionaries
      self.tgt_dicts = task.target_dictionaries
      self.channels = task.channels
  
      # optimize model for generation
      for model in self.models:
          model.prepare_for_inference_(cfg)
  
file_path: fairseq/fairseq/models/speech_dlm/hub_interface.py
imports: import copy
  import logging
  from typing import Any, Dict, Iterator, List
  import torch
  from fairseq import utils
  from omegaconf import open_dict
  from torch import nn
  from tqdm import tqdm
  from fairseq.hub_utils import GeneratorHubInterface
label_desc: Use image node_id 1 to create a new MultichannelGeneratorHubInterface object from inherited base classes: GeneratorHubInterface with example: obj = MultichannelGeneratorHubInterface(cfg, task, models)