def max_value_of_dtype(dtype: torch.dtype):
    """
    Returns the maximum value of a given PyTorch data type. Does not allow torch.bool.
    """
    return info_value_of_dtype(dtype).max
Returns the maximum value of a given PyTorch data type. Does not allow torch.bool.
allennlp/nn/util.py