(node_tuples, quant_spec, input_node=False)
| 21 | |
| 22 | |
| 23 | def _annotate_nodes(node_tuples, quant_spec, input_node=False): |
| 24 | for node_tuple in node_tuples: |
| 25 | node = node_tuple[0] |
| 26 | quant_annotation = node.meta.get( |
| 27 | Q_ANNOTATION_KEY, QuantizationAnnotation(_annotated=True) |
| 28 | ) |
| 29 | if input_node: |
| 30 | input_node = node_tuple[1] |
| 31 | quant_annotation.input_qspec_map[input_node] = quant_spec |
| 32 | else: |
| 33 | quant_annotation.output_qspec = quant_spec |
| 34 | node.meta[Q_ANNOTATION_KEY] = quant_annotation |
no test coverage detected