(self, beam, cov, beta=0.)
return beta * penalty
Our summary penalty.
Our summary penalty.
Our summary penalty .
def coverage_summary(self, beam, cov, beta=0.):
        """
        Our summary penalty.
        """
        penalty = torch.max(cov, cov.clone().fill_(1.0)).sum(1)
        penalty -= cov.size(1)
        return beta * penalty
def coverage_summary ( self , beam , cov , beta = 0. ) : penalty = torch . max ( cov , cov . clone ( ) . fill_ ( 1.0 ) ) . sum ( 1 ) penalty -= cov . size ( 1 ) return beta * penalty