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: 3

Non-data size: 4

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: theislab/scanpy
Commit Name: 1400d1e35f908d6f5ab8a8681970ac4aba673565
Time: 2019-07-11
Author: ivirshup@gmail.com
File Name: scanpy/tools/_umap.py
Class Name:
Method Name: umap


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__