(x)
return torch.log(torch.sum(torch.exp(x-x_max), 1, keepdim=True)) + x_max
Utility function for computing log_sum_exp while determining
    This will be used to determine unaveraged confidence loss across
    all examples in a batch.
    Args:
        x (Variable(tensor)): conf_preds from conf layers
Utility function for computing log_sum_exp while determining
    This will be used to determine unaveraged confidence loss across
    all examples in a batch.
    Args:
        x (Variable(tensor)): conf_preds from conf layers
Utility function for computing log_sum_exp while determining This will be used to determine unaveraged confidence loss across all examples in a batch . Args : x ( Variable ( tensor )) : conf_preds from conf layers
def log_sum_exp(x):
    """Utility function for computing log_sum_exp while determining
    This will be used to determine unaveraged confidence loss across
    all examples in a batch.
    Args:
        x (Variable(tensor)): conf_preds from conf layers
    """
    x_max = x.data.max()
    return torch.log(torch.sum(torch.exp(x-x_max), 1, keepdim=True)) + x_max
def log_sum_exp ( x ) : x_max = x . data . max ( ) return torch . log ( torch . sum ( torch . exp ( x - x_max ) , 1 , keepdim = True ) ) + x_max