    def get_loss(self):
        """a loss term for regularizing the span length"""
        return self._max_span * self._mask.current_val.float().mean()
a loss term for regularizing the span length
examples/adaptive_span/adaptive_span_attention.py