MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _calibrate

Function _calibrate

tools/low_precision_optimize/low_precision_optimize.py:191–195  ·  view source on GitHub ↗
(ts_name)

Source from the content-addressed store, hash-verified

189 calib_data = np.load(calib_file, allow_pickle=True, encoding='bytes')
190
191 def _calibrate(ts_name):
192 assert calib_data is not None, 'Calibration data needed for INT8 optimization.'
193 values = [session.run(ts_name, feed_dict=fd) for fd in calib_data]
194 values = np.concatenate([v.ravel() for v in values])
195 return non_linear_quant_params_search(values)
196
197 def _get_matmul_pattern(with_bias, with_relu):
198 pl = list()

Callers 1

_optimizeFunction · 0.85

Calls 3

runMethod · 0.45
concatenateMethod · 0.45

Tested by

no test coverage detected