class_docstr: Multi-headed attention.
  
  See "Attention Is All You Need" for more details.
class_docstr_tok: ["Multi-headed","attention",".","See","``","Attention","Is","All","You","Need","''","for","more","details","."]
docstr: Used for effiecient beamable enc-dec attention
docstr_tok: ["Used","for","effiecient","beamable","enc-dec","attention"]
code: def set_beam_size(self, beam_size):
      """Used for effiecient beamable enc-dec attention"""
      self.beam_size = beam_size
  
imports: import math
  from typing import Dict, List, Optional, Tuple
  import torch
  import torch.nn.functional
  from torch import Tensor, nn
  from torch.nn import Parameter
  from fairseq import utils
  from fairseq.modules.fairseq_dropout import FairseqDropout
  from fairseq.modules.quant_noise import quant_noise
  from fairseq.models.fairseq_incremental_decoder import FairseqIncrementalDecoder
label_desc: Use image node_id 14 for calling the MultiheadAttention obj's underlying member method code with example usage: obj.set_beam_size(beam_size) without return types