def __init__(self, quantizable_layer_type=['Conv2D', 'Linear', 'Conv2DTranspose'], weight_quantize_type='abs_max', activation_quantize_type='moving_average_abs_max', weight_bits=8, activation_bits=8, moving_rate=0.9, weight_preprocess_layer=None, act_preprocess_layer=None, weight_quantize_layer=None, act_quantize_layer=None):
    '\n        The constructor for ImperativeQuantizeInputs. \n\n        Please refer to the args of ImperativeQuantAware.\n        '
    super(ImperativeQuantizeInputs, self).__init__()
    self._quantizable_layer_type = tuple(((utils.layer_name_map[layer] if (layer in utils.layer_name_map) else layer) for layer in quantizable_layer_type))
    for layer in self._quantizable_layer_type:
        assert ((not isinstance(layer, str)) and (layer in utils.fake_quant_input_layers)), ('%s is unspported to be quantized.' % layer)
    quantize_type = {'abs_max', 'moving_average_abs_max', 'channel_wise_abs_max'}
    assert ((weight_quantize_type != 'moving_average_abs_max') and (weight_quantize_type in quantize_type)), ('Unsupported weight_quantize_type: %s. It can only be abs_max or channel_wise_abs_max.' % weight_quantize_type)
    assert (activation_quantize_type == 'moving_average_abs_max'), ('Unsupported activation_quantize_type: %s. It can only be moving_average_abs_max now.' % activation_quantize_type)
    bits_check = (lambda bits: (isinstance(bits, int) and (bits >= 0) and (bits <= 16)))
    assert bits_check(weight_bits), 'weight_bits should be 1, 2,... or 16.'
    assert bits_check(activation_bits), 'activation_bits should be 1, 2,... or 16.'
    layer_check = (lambda method: ((method is None) or issubclass(method, dygraph.layers.Layer)))
    assert layer_check(weight_preprocess_layer), 'weight_preprocess should be nn.Layer.'
    assert layer_check(act_preprocess_layer), 'act_preprocess should be nn.Layer.'
    assert layer_check(weight_quantize_layer), 'weight_quantize should be nn.Layer.'
    assert layer_check(act_quantize_layer), 'act_quantize should be nn.Layer.'
    self._kwargs = {'weight_quantize_type': weight_quantize_type, 'activation_quantize_type': activation_quantize_type, 'weight_bits': weight_bits, 'activation_bits': activation_bits, 'moving_rate': moving_rate, 'weight_pre_layer': weight_preprocess_layer, 'act_pre_layer': act_preprocess_layer, 'weight_quant_layer': weight_quantize_layer, 'act_quant_layer': act_quantize_layer}
The constructor for ImperativeQuantizeInputs. 

Please refer to the args of ImperativeQuantAware.
def __init__(self, quantizable_layer_type=['Conv2D', 'Linear', 'Conv2DTranspose'], weight_quantize_type='abs_max', activation_quantize_type='moving_average_abs_max', weight_bits=8, activation_bits=8, moving_rate=0.9, weight_preprocess_layer=None, act_preprocess_layer=None, weight_quantize_layer=None, act_quantize_layer=None):
    '\n        The constructor for ImperativeQuantizeInputs. \n\n        Please refer to the args of ImperativeQuantAware.\n        '
    super(ImperativeQuantizeInputs, self).__init__()
    self._quantizable_layer_type = tuple(((utils.layer_name_map[layer] if (layer in utils.layer_name_map) else layer) for layer in quantizable_layer_type))
    for layer in self._quantizable_layer_type:
        assert ((not isinstance(layer, str)) and (layer in utils.fake_quant_input_layers)), ('%s is unspported to be quantized.' % layer)
    quantize_type = {'abs_max', 'moving_average_abs_max', 'channel_wise_abs_max'}
    assert ((weight_quantize_type != 'moving_average_abs_max') and (weight_quantize_type in quantize_type)), ('Unsupported weight_quantize_type: %s. It can only be abs_max or channel_wise_abs_max.' % weight_quantize_type)
    assert (activation_quantize_type == 'moving_average_abs_max'), ('Unsupported activation_quantize_type: %s. It can only be moving_average_abs_max now.' % activation_quantize_type)
    bits_check = (lambda bits: (isinstance(bits, int) and (bits >= 0) and (bits <= 16)))
    assert bits_check(weight_bits), 'weight_bits should be 1, 2,... or 16.'
    assert bits_check(activation_bits), 'activation_bits should be 1, 2,... or 16.'
    layer_check = (lambda method: ((method is None) or issubclass(method, dygraph.layers.Layer)))
    assert layer_check(weight_preprocess_layer), 'weight_preprocess should be nn.Layer.'
    assert layer_check(act_preprocess_layer), 'act_preprocess should be nn.Layer.'
    assert layer_check(weight_quantize_layer), 'weight_quantize should be nn.Layer.'
    assert layer_check(act_quantize_layer), 'act_quantize should be nn.Layer.'
    self._kwargs = {'weight_quantize_type': weight_quantize_type, 'activation_quantize_type': activation_quantize_type, 'weight_bits': weight_bits, 'activation_bits': activation_bits, 'moving_rate': moving_rate, 'weight_pre_layer': weight_preprocess_layer, 'act_pre_layer': act_preprocess_layer, 'weight_quant_layer': weight_quantize_layer, 'act_quant_layer': act_quantize_layer}