(ts_name)
| 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() |
no test coverage detected