class_docstr: This ``Module`` implements the matching layer of BiMPM model described in `Bilateral
  Multi-Perspective Matching for Natural Language Sentences <https://arxiv.org/abs/1702.03814>`_
  by Zhiguo Wang et al., 2017.
  Also please refer to the `TensorFlow implementation <https://github.com/zhiguowang/BiMPM/>`_ and
  `PyTorch implementation <https://github.com/galsang/BIMPM-pytorch>`_.
  
  Parameters
  ----------
  hidden_dim : ``int``, optional (default = 100)
      The hidden dimension of the representations
  num_perspectives : ``int``, optional (default = 20)
      The number of perspectives for matching
  share_weights_between_directions : ``bool``, optional (default = True)
      If True, share weight between matching from sentence1 to sentence2 and from sentence2
      to sentence1, useful for non-symmetric tasks
  is_forward : ``bool``, optional (default = None)
      Whether the matching is for forward sequence or backward sequence, useful in finding last
      token in full matching. It can not be None if with_full_match is True.
  with_full_match : ``bool``, optional (default = True)
      If True, include full match
  with_maxpool_match : ``bool``, optional (default = True)
      If True, include max pool match
  with_attentive_match : ``bool``, optional (default = True)
      If True, include attentive match
  with_max_attentive_match : ``bool``, optional (default = True)
      If True, include max attentive match
class_docstr_tok: ["This","``","Module","``","implements","the","matching","layer","of","BiMPM","model","described","in","`","Bilateral","Multi-Perspective","Matching","for","Natural","Language","Sentences","<","https",":","\/\/arxiv.org\/abs\/1702.03814",">","`","_","by","Zhiguo","Wang","et","al.",",","2017",".","Also","please","refer","to","the","`","TensorFlow","implementation","<","https",":","\/\/github.com\/zhiguowang\/BiMPM\/",">","`","_","and","`","PyTorch","implementation","<","https",":","\/\/github.com\/galsang\/BIMPM-pytorch",">","`","_",".","Parameters","--","--","--","--","--","hidden_dim",":","``","int","``",",","optional","(","default","=","100",")","The","hidden","dimension","of","the","representations","num_perspectives",":","``","int","``",",","optional","(","default","=","20",")","The","number","of","perspectives","for","matching","share_weights_between_directions",":","``","bool","``",",","optional","(","default","=","True",")","If","True",",","share","weight","between","matching","from","sentence1","to","sentence2","and","from","sentence2","to","sentence1",",","useful","for","non-symmetric","tasks","is_forward",":","``","bool","``",",","optional","(","default","=","None",")","Whether","the","matching","is","for","forward","sequence","or","backward","sequence",",","useful","in","finding","last","token","in","full","matching",".","It","can","not","be","None","if","with_full_match","is","True",".","with_full_match",":","``","bool","``",",","optional","(","default","=","True",")","If","True",",","include","full","match","with_maxpool_match",":","``","bool","``",",","optional","(","default","=","True",")","If","True",",","include","max","pool","match","with_attentive_match",":","``","bool","``",",","optional","(","default","=","True",")","If","True",",","include","attentive","match","with_max_attentive_match",":","``","bool","``",",","optional","(","default","=","True",")","If","True",",","include","max","attentive","match"]
code: def get_output_dim(self):
      return self.output_dim
  
file_path: magnitude/pymagnitude/third_party/allennlp/modules/bimpm_matching.py
imports: from __future__ import division
  from __future__ import absolute_import
  import torch
  import torch.nn
  import torch.nn.functional
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.registrable import FromParams
  from allennlp.nn.util import get_lengths_from_binary_sequence_mask, masked_max, masked_mean, masked_softmax
label_desc: Use image node_id 2 for calling the BiMpmMatching obj's underlying member method code with example usage: obj.get_output_dim() and returns: self