4013b930923dd45ed6a0960505fd04f5a88d7428,hls4ml/model/optimizer/passes/bn_quant.py,QuantizeDenseOutput,transform,#QuantizeDenseOutput#Any#Any#,118

Before Change



        quantized_data = None
        quantized_precision = None
        if node.get_attr("quantize") == 2:
            quantized_data = model.quantize_data(node.weights["weight"].data, 1)
            quantized_precision = "ap_uint<1>"
        elif node.get_attr("quantize") == 3:

After Change


            quantized_precision = hls_model.IntegerPrecisionType(width=2)
        else:
            print("WARNING: Unknown quantizer - {}. Bailing out".format(quantizer.__class__.__name__))
            return False
        quantizer.bits = quantized_precision.width
        quantizer.hls_type = quantized_precision
        quantized_data = quantizer(node.weights["weight"].data)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: hls-fpga-machine-learning/hls4ml
Commit Name: 4013b930923dd45ed6a0960505fd04f5a88d7428
Time: 2020-04-29
Author: vloncar@users.noreply.github.com
File Name: hls4ml/model/optimizer/passes/bn_quant.py
Class Name: QuantizeDenseOutput
Method Name: transform


Project Name: explosion/thinc
Commit Name: 6d3ec6c28f32560121d93b8fcab2cf7924f59dc5
Time: 2020-01-02
Author: honnibal+gh@gmail.com
File Name: thinc/layers/pytorchwrapper.py
Class Name:
Method Name: forward


Project Name: Microsoft/MMdnn
Commit Name: b3bc509ad60a7ce5befbb50275a350d5959ea520
Time: 2018-10-25
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_frozenparser.py
Class Name: TensorflowParser2
Method Name: rename_Gather