class_docstr: Computes span representations by generating an unnormalized attention score for each
  word in the document. Spans representations are computed with respect to these
  scores by normalising the attention scores for words inside the span.
  
  Given these attention distributions over every span, this module weights the
  corresponding vector representations of the words in the span by this distribution,
  returning a weighted representation of each span.
  
  Parameters
  ----------
  input_dim : ``int``, required.
      The final dimension of the ``sequence_tensor``.
  
  Returns
  -------
  attended_text_embeddings : ``torch.FloatTensor``.
      A tensor of shape (batch_size, num_spans, input_dim), which each span representation
      is formed by locally normalising a global attention over the sequence. The only way
      in which the attention distribution differs over different spans is in the set of words
      over which they are normalized.
class_docstr_tok: ["Computes","span","representations","by","generating","an","unnormalized","attention","score","for","each","word","in","the","document",".","Spans","representations","are","computed","with","respect","to","these","scores","by","normalising","the","attention","scores","for","words","inside","the","span",".","Given","these","attention","distributions","over","every","span",",","this","module","weights","the","corresponding","vector","representations","of","the","words","in","the","span","by","this","distribution",",","returning","a","weighted","representation","of","each","span",".","Parameters","--","--","--","--","--","input_dim",":","``","int","``",",","required",".","The","final","dimension","of","the","``","sequence_tensor","``",".","Returns","--","--","--","-","attended_text_embeddings",":","``","torch.FloatTensor","``",".","A","tensor","of","shape","(","batch_size",",","num_spans",",","input_dim",")",",","which","each","span","representation","is","formed","by","locally","normalising","a","global","attention","over","the","sequence",".","The","only","way","in","which","the","attention","distribution","differs","over","different","spans","is","in","the","set","of","words","over","which","they","are","normalized","."]
code: def get_input_dim(self) -> int:
      return self._input_dim
  
file_path: jiant/jiant/ext/allennlp.py
imports: from typing import Optional
  import torch
  import torch.nn
label_desc: Use image node_id 2 for calling the SelfAttentiveSpanExtractor obj's underlying member method code with example usage: obj.get_input_dim() and returns: self