8c4ca59b578a5e4bc7ef82c69722247307280160,hls4ml/converters/keras/qkeras.py,QKerasPO2Quantizer,__call__,#QKerasPO2Quantizer#Any#,54

Before Change


        sign = np.where(y < 0, np.zeros_like(y), np.ones_like(y))
        // Take the logarithm, since this is what we will write to the header
        // for the optimized product using shifts
        y = (tf.math.log(tf.math.abs(y)) / tf.math.log(2.)).numpy().astype("int")
        return np.stack((sign, y), axis=-1)

def get_type(quantizer_config):
    width = quantizer_config["config"]["bits"]

After Change


        """
        x = tf.convert_to_tensor(data)
        y = self.quantizer_fn(x)
        if hasattr(y, "numpy"):
            y = y.numpy()
        return y

def get_type(quantizer_config):
    width = quantizer_config["config"]["bits"]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: hls-fpga-machine-learning/hls4ml
Commit Name: 8c4ca59b578a5e4bc7ef82c69722247307280160
Time: 2020-11-18
Author: sioni.summers10@imperial.ac.uk
File Name: hls4ml/converters/keras/qkeras.py
Class Name: QKerasPO2Quantizer
Method Name: __call__


Project Name: tensorflow/tpu
Commit Name: 58086fa0a4fdd7c72a9ca51746a754fbd6644b91
Time: 2019-08-06
Author: gardener@tensorflow.org
File Name: models/common/distributed_executor.py
Class Name: DistributedExecutor
Method Name: _run_evaluation


Project Name: hls-fpga-machine-learning/hls4ml
Commit Name: 8c4ca59b578a5e4bc7ef82c69722247307280160
Time: 2020-11-18
Author: sioni.summers10@imperial.ac.uk
File Name: hls4ml/model/optimizer/passes/qkeras.py
Class Name: QKerasPO2Quantizer
Method Name: __call__


Project Name: tensorflow/tpu
Commit Name: 0789cc08dd92a43422469fc4973ecc972d032421
Time: 2019-08-06
Author: yeqing@google.com
File Name: models/common/distributed_executor.py
Class Name: DistributedExecutor
Method Name: _run_evaluation