class_docstr: This module scores and prunes span-based representations using a parameterised scoring
  function and a threshold.
  
  Parameters
  ----------
  scorer : ``torch.nn.Module``, required.
      A module which, given a tensor of shape (batch_size, num_spans, embedding_size),
      produces a tensor of shape (batch_size, num_spans, 1), representing a scalar score
      per span in the tensor.
class_docstr_tok: ["This","module","scores","and","prunes","span-based","representations","using","a","parameterised","scoring","function","and","a","threshold",".","Parameters","--","--","--","--","--","scorer",":","``","torch.nn.Module","``",",","required",".","A","module","which",",","given","a","tensor","of","shape","(","batch_size",",","num_spans",",","embedding_size",")",",","produces","a","tensor","of","shape","(","batch_size",",","num_spans",",","1",")",",","representing","a","scalar","score","per","span","in","the","tensor","."]
code: def __init__(self, scorer):
      super(SpanPruner, self).__init__()
      self._scorer = scorer
  
imports: from __future__ import absolute_import
  import torch
  from allennlp.nn import util
label_desc: Use image node_id 1 to create a new SpanPruner object from inherited base classes: torch.nn with example: obj = SpanPruner(scorer)