A WAR for codes that messes up logging format
Remove all handler in root logger
Function to get absolute maximum of a tensor Follow numpy fashion, which is more generic as pytorch’s
- pytorch_quantization.utils.reduce_amax.reduce_amax(input, axis=None, keepdims=True)¶
Compute the absolute maximum value of a tensor.
Reduces input_tensor along the dimensions given in axis. Unless keepdims is true, the rank of the tensor is reduced by 1 for each entry in axis. If keepdims is true, the reduced dimensions are retained with length 1.
Gradient computeation is disabled as this function is never meant learning reduces amax
input – Input tensor
axis – The dimensions to reduce. None or int or tuple of ints. If None (the default), reduces all dimensions. Must be in the range [-rank(input_tensor), rank(input_tensor)).
keepdims – A boolean. If true, retains reduced dimensions with length 1. Default True
granularity – DEPRECTED. specifies if the statistic has to be calculated at tensor or channel granularity
The reduced tensor.