qkeras.qconvolutional
Functions
|
Adds a quantized separableconv2d. |
|
Determines output length of a transposed convolution given input length. |
Classes
|
1D convolution layer (e.g. spatial convolution over images). |
|
2D convolution layer (e.g. spatial convolution over images). |
|
2D convolution layer (e.g. spatial convolution over images). |
|
Creates quantized depthwise conv2d. |
|
Depthwise separable 1D convolution. |
|
Depthwise separable 2D convolution. |
- class qkeras.qconvolutional.QConv1D(*args, **kwargs)[source]
Bases:
Conv1D1D convolution layer (e.g. spatial convolution over images).
- class qkeras.qconvolutional.QConv2D(*args, **kwargs)[source]
Bases:
Conv2D2D convolution layer (e.g. spatial convolution over images).
- classmethod from_config(config)[source]
Creates an operation from its config.
This method is the reverse of get_config, capable of instantiating the same operation from the config dictionary.
Note: If you override this method, you might receive a serialized dtype config, which is a dict. You can deserialize it as follows:
```python if “dtype” in config and isinstance(config[“dtype”], dict):
policy = dtype_policies.deserialize(config[“dtype”])
- Parameters:
config – A Python dictionary, typically the output of get_config.
- Returns:
An operation instance.
- class qkeras.qconvolutional.QConv2DTranspose(*args, **kwargs)[source]
Bases:
Conv2DTranspose2D convolution layer (e.g. spatial convolution over images).
- class qkeras.qconvolutional.QDepthwiseConv2D(*args, **kwargs)[source]
Bases:
DepthwiseConv2DCreates quantized depthwise conv2d. Copied from mobilenet.
- qkeras.qconvolutional.QMobileNetSeparableConv2D(filters, kernel_size, strides=(1, 1), padding='VALID', dilation_rate=(1, 1), depth_multiplier=1, activation=None, use_bias=True, depthwise_initializer='he_normal', pointwise_initializer='he_normal', bias_initializer='zeros', depthwise_regularizer=None, pointwise_regularizer=None, bias_regularizer=None, activity_regularizer=None, depthwise_constraint=None, pointwise_constraint=None, bias_constraint=None, depthwise_quantizer=None, pointwise_quantizer=None, bias_quantizer=None, depthwise_activation=None, depthwise_range=None, pointwise_range=None, bias_range=None, depthwise_dropout_rate=0.0, pw_first=False, name='')[source]
Adds a quantized separableconv2d.
- class qkeras.qconvolutional.QSeparableConv1D(*args, **kwargs)[source]
Bases:
SeparableConv1DDepthwise separable 1D convolution.
- class qkeras.qconvolutional.QSeparableConv2D(*args, **kwargs)[source]
Bases:
SeparableConv2DDepthwise separable 2D convolution.
- qkeras.qconvolutional.deconv_output_length(input_length, filter_size, padding, output_padding=None, stride=0, dilation=1)[source]
Determines output length of a transposed convolution given input length.
- Parameters:
input_length – Integer.
filter_size – Integer.
padding – one of “same”, “valid”, “full”.
output_padding – Integer, amount of padding along the output dimension. Can be set to None in which case the output length is inferred.
stride – Integer.
dilation – Integer.
- Returns:
The output length (integer).