onnxconverter-common
onnxconverter-common copied to clipboard
max_finite_val default value
Hi, I notice that convert_np_to_float16(np_array, min_positive_val=1e-7, max_finite_val=1e4) has 1e4 as the default value for max_finite_val, however the max value for float16 is 65504. Onnxruntime repo also has 65504 for their version of convert_np_to_float16. https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/python/tools/transformers/float16.py#L40
Could someone please to explain to me why setting 1e4 as max_finite_val?