(self, input, input_q, index)
| 121 | return output |
| 122 | |
| 123 | def mixed_fp16_quantize(self, input, input_q, index): |
| 124 | if self.q_mixed_fp16 and self.q_start_bits[index] >= (self.q_target_bits - 1): |
| 125 | input_q = input * self.quantize_real_ratio + (1 - self.quantize_real_ratio) * input_q |
| 126 | return input_q |
| 127 | return input_q |
| 128 | |
| 129 | def compute_quantization(self, input, index=0, factor=1): |
| 130 | # fixing the quantization bits based on the training steps |
no outgoing calls
no test coverage detected