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.
code: def __init__(self, input_dim):
      super(SelfAttentiveSpanExtractor, self).__init__()
      self._input_dim = input_dim
      self._global_attention = TimeDistributed(
          torch.nn.Linear(input_dim, 1)
      )
  
file_path: magnitude/pymagnitude/third_party/allennlp/modules/span_extractors/self_attentive_span_extractor.py
imports: from __future__ import absolute_import
  import torch
  from allennlp.modules.span_extractors.span_extractor import SpanExtractor
  from allennlp.modules.time_distributed import TimeDistributed
  from allennlp.nn import util
label_desc: Use image node_id 1 to create a new SelfAttentiveSpanExtractor object from inherited base classes: SpanExtractor with example: obj = SelfAttentiveSpanExtractor(input_dim)