class_docstr: n-gram decoder.
  
  This decoder implementation does not condition on the full target-side
  history. Instead, predictions only depend on the target n-gram history and
  the full source sentence via attention over encoder outputs. The decoder
  network is a feedforward network with source context as additional input.
class_docstr_tok: ["n-gram","decoder",".","This","decoder","implementation","does","not","condition","on","the","full","target-side","history",".","Instead",",","predictions","only","depend","on","the","target","n-gram","history","and","the","full","source","sentence","via","attention","over","encoder","outputs",".","The","decoder","network","is","a","feedforward","network","with","source","context","as","additional","input","."]
docstr: Maximum output length supported by the decoder.
docstr_tok: ["Maximum","output","length","supported","by","the","decoder","."]
code: def max_positions(self):
      """Maximum output length supported by the decoder."""
      return int(1e5)
  
file_path: translate/pytorch_translate/ngram.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import utils
  from pytorch_translate import attention, utils
  from pytorch_translate.common_layers import DecoderWithOutputProjection, Embedding, Linear, NonlinearLayer
  from pytorch_translate.utils import maybe_cat
label_desc: Use image node_id 3 for calling the NGramDecoder obj's underlying member method code with example usage: obj.max_positions() and returns: int