575a3835315a533a19e871ee913f01142befebab,tests/python/frontend/tflite/test_forward.py,,_test_quantize_dequantize,#Any#,1686

Before Change


        for i in range(100):
            yield [data]

    converter.optimizations = [tf.lite.Optimize.OPTIMIZE_FOR_SIZE]
    converter.representative_dataset = representative_data_gen
    converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8]
    converter.inference_input_type = tf.uint8
    converter.inference_output_type = tf.uint8

After Change


    data_in = tf.keras.layers.Input(shape=data.shape[1:])
    relu = tf.keras.layers.ReLU()(data_in)
    add = tf.keras.layers.Add()([data_in, relu])
    concat = tf.keras.layers.Concatenate(axis=0)([relu, add])
    keras_model = tf.keras.models.Model(inputs=data_in, outputs=concat)
    input_name = data_in.name.split(":")[0]

    // To create quantized values with dynamic range of activations, needs representative dataset
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: apache/incubator-tvm
Commit Name: 575a3835315a533a19e871ee913f01142befebab
Time: 2020-07-02
Author: anijain@umich.edu
File Name: tests/python/frontend/tflite/test_forward.py
Class Name:
Method Name: _test_quantize_dequantize


Project Name: keras-team/autokeras
Commit Name: 41c99fbf385a8c875fb6181ce7301e4bc218535b
Time: 2020-04-18
Author: jhfjhfj1@gmail.com
File Name: autokeras/keras_layers.py
Class Name: CategoricalEncoding
Method Name: call