# UniformQuantizedConvolution

public final class **UniformQuantizedConvolution** Perform quantized convolution of quantized Tensor \`lhs\` and quantized Tensor \`rhs\`. to make quantized \`output\`.


Given quantized \`lhs\` and quantized \`rhs\`, performs quantized dot on \`lhs\` and \`rhs\` to make quantized \`output\`.


\`lhs\` and \`rhs\` must be Tensors of same rank, and meet following shape conditions.
- \`lhs_feature\` % \`feature_group_count\` == 0
- \`lhs_feature\` % \`rhs_input_feature\` == 0
- \`lhs_feature\` / \`feature_group_count\` == \`rhs_input_feature\`
- \`rhs_output_feature\` % \`feature_group_count\` == 0
- \`lhs_batch\` % \`batch_group_count\` == 0
- \`rhs_output_feature\` % \`batch_group_count\` == 0


\`lhs\` and \`rhs\` must be quantized Tensor, where data value is quantized using the formula:

    quantized_data = clip(original_data / scale + zero_point, quantization_min_val, quantization_max_val)
     
\`output\` is also quantized, using the same formula. If \`rhs\` is per-tensor quantized, \`output\` must be also per-tensor quantized.

<br />

<br />

<br />

<br />

### Nested Classes

|---|---|---|---|
| class | [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options) || Optional attributes for `https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution` |

### Public Methods

|---|---|
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<U\> | [asOutput](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution#asOutput())() Returns the symbolic handle of a tensor. |
| static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options) | [batchGroupCount](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution#batchGroupCount(java.lang.Long))(Long batchGroupCount) |
| static \<U, T\> [UniformQuantizedConvolution](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution)\<U\> | [create](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution#create(org.tensorflow.op.Scope,%20org.tensorflow.Operand<T>,%20org.tensorflow.Operand<T>,%20org.tensorflow.Operand<java.lang.Float>,%20org.tensorflow.Operand<java.lang.Integer>,%20org.tensorflow.Operand<java.lang.Float>,%20org.tensorflow.Operand<java.lang.Integer>,%20org.tensorflow.Operand<java.lang.Float>,%20org.tensorflow.Operand<java.lang.Integer>,%20java.lang.Class<U>,%20java.lang.String,%20java.lang.Long,%20java.lang.Long,%20java.lang.Long,%20java.lang.Long,%20java.lang.Long,%20java.lang.Long,%20org.tensorflow.op.core.UniformQuantizedConvolution.Options...))([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\> lhs, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\> rhs, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> lhsScales, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Integer\> lhsZeroPoints, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> rhsScales, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Integer\> rhsZeroPoints, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> outputScales, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Integer\> outputZeroPoints, Class\<U\> Tout, String padding, Long lhsQuantizationMinVal, Long lhsQuantizationMaxVal, Long rhsQuantizationMinVal, Long rhsQuantizationMaxVal, Long outputQuantizationMinVal, Long outputQuantizationMaxVal, [Options...](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options) options) Factory method to create a class wrapping a new UniformQuantizedConvolution operation. |
| static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options) | [dimensionNumbers](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution#dimensionNumbers(java.lang.String))(String dimensionNumbers) |
| static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options) | [explicitPadding](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution#explicitPadding(java.util.List<java.lang.Long>))(List\<Long\> explicitPadding) |
| static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options) | [featureGroupCount](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution#featureGroupCount(java.lang.Long))(Long featureGroupCount) |
| static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options) | [lhsDilation](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution#lhsDilation(java.util.List<java.lang.Long>))(List\<Long\> lhsDilation) |
| static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options) | [lhsQuantizationAxis](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution#lhsQuantizationAxis(java.lang.Long))(Long lhsQuantizationAxis) |
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<U\> | [output](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution#output())() The output quantized tensor of \`Tout\`, same rank as \`lhs\` and \`rhs\`. |
| static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options) | [outputQuantizationAxis](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution#outputQuantizationAxis(java.lang.Long))(Long outputQuantizationAxis) |
| static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options) | [rhsDilation](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution#rhsDilation(java.util.List<java.lang.Long>))(List\<Long\> rhsDilation) |
| static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options) | [rhsQuantizationAxis](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution#rhsQuantizationAxis(java.lang.Long))(Long rhsQuantizationAxis) |
| static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options) | [windowStrides](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution#windowStrides(java.util.List<java.lang.Long>))(List\<Long\> windowStrides) |

### Inherited Methods

From class [org.tensorflow.op.PrimitiveOp](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp)

|---|---|
| final boolean | [equals](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#equals(java.lang.Object))(Object obj) |
| final int | [hashCode](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#hashCode())() |
| [Operation](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation) | [op](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#op())() Returns the underlying `https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation` |
| final String | [toString](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#toString())() |

From class java.lang.Object

|---|---|
| boolean | equals(Object arg0) |
| final Class\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| String | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

From interface [org.tensorflow.Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)

|---|---|
| abstract [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<U\> | [asOutput](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand#asOutput())() Returns the symbolic handle of a tensor. |

## Public Methods

#### public [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<U\>
**asOutput**
()

Returns the symbolic handle of a tensor.

Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is
used to obtain a symbolic handle that represents the computation of the input.

<br />

#### public static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options)
**batchGroupCount**
(Long batchGroupCount)

<br />

##### Parameters

| batchGroupCount | The number of batch groups. Used for grouped filters. Must be a divisor of \`output_feature\`. |
|---|---|

#### public static [UniformQuantizedConvolution](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution)\<U\>
**create**
([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\> lhs, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\> rhs, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> lhsScales, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Integer\> lhsZeroPoints, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> rhsScales, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Integer\> rhsZeroPoints, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Float\> outputScales, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Integer\> outputZeroPoints, Class\<U\> Tout, String padding, Long lhsQuantizationMinVal, Long lhsQuantizationMaxVal, Long rhsQuantizationMinVal, Long rhsQuantizationMaxVal, Long outputQuantizationMinVal, Long outputQuantizationMaxVal, [Options...](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options) options)

Factory method to create a class wrapping a new UniformQuantizedConvolution operation.

##### Parameters

| scope | current scope |
| lhs | Must be a quantized tensor, rank \>= 3. |
| rhs | Must be a quantized tensor, same rank as \`lhs\`. |
| lhsScales | The float value(s) used as scale factors when quantizing the original data that \`lhs\` represents. Must be a scalar \`Tensor\` (\`lhs\` supports only per-tensor quantization). |
| lhsZeroPoints | The int32 value(s) used as zero points when quantizing original data that \`lhs\` represents. Same shape condition as \`lhs_scales\`. |
| rhsScales | The float value(s) used as scale factors when quantizing the original data that \`rhs\` represents. Must be a scalar \`Tensor\` for per-tensor quantization, or 1D \`Tensor\` of size \`rhs.dim_size(kernel_output_feature_dimension)\`, for per-channel quantization. |
| rhsZeroPoints | The int32 value(s) used as zero points when quantizing original data that \`rhs\` represents. Same shape condition as \`rhs_scales\`. |
| outputScales | The float value(s) to use as scale factors when quantizing original data that \`output\` represents. Must be a scalar \`Tensor\` for per-tensor quantization, or 1D \`Tensor\` of size \`rhs.dim_size(kernel_output_feature_dimension)\` - which is equal to \`output.dim_size(output_feature_dimension)\`, for per-channel quantization. If \`rhs\` is per-tensor quantized, output must be also per-tensor quantized. This means that if \`rhs_scales\` and \`rhs_zero_points\` are scalar \`Tensor\`s, \`output_scales\` and \`output_zero_points\` must be scalar \`Tensor\`s as well. |
| outputZeroPoints | The int32 value(s) used as zero points when quantizing original data that output represents. Same shape condition as \`output_scales\`. |
| Tout | The type of \`output\` \`Tensor\`. |
| padding | string from: \`"SAME"\`, \`"VALID"\`, or \`"EXPLICIT"\`, indicating the type of padding algorithm to use. |
| lhsQuantizationMinVal | The min value of the quantized data stored in \`lhs\`. For example, if \`Tin\` is \`qint8\`, this must be set to -127 if narrow range quantized or -128 if not. |
| lhsQuantizationMaxVal | The max value of the quantized data stored in \`lhs\`. For example, if \`Tin\` is \`qint8\`, this must be set to 127. |
| rhsQuantizationMinVal | The min value of the quantized data stored in \`rhs\`. For example, if \`Tin\` is \`qint8\`, this must be set to -127 if narrow range quantized or -128 if not. |
| rhsQuantizationMaxVal | The max value of the quantized data stored in \`rhs\`. For example, if \`Tin\` is \`qint8\`, this must be set to 127. |
| outputQuantizationMinVal | The min value of the quantized data stored in \`output\`. For example, if \`Tout\` is \`qint8\`, this must be set to -127 if narrow range quantized or -128 if not. |
| outputQuantizationMaxVal | The max value of the quantized data stored in \`output\`. For example, if \`Tout\` is \`qint8\`, this must be set to 127. |
| options | carries optional attributes values |
|---|---|

##### Returns

- a new instance of UniformQuantizedConvolution

#### public static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options)
**dimensionNumbers**
(String dimensionNumbers)

<br />

##### Parameters

| dimensionNumbers | Structure of dimension information for the convolution op. Must be an empty string (default) or a serialized string of \`tensorflow.UniformQuantizedConvolutionDimensionNumbersAttr\` proto. If empty string, the default is \`("NCHW", "OIHW", "NCHW")\` (for a 2D convolution). |
|---|---|

#### public static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options)
**explicitPadding**
(List\<Long\> explicitPadding)

<br />

##### Parameters

| explicitPadding | If \`padding\` is \`"EXPLICIT"\`, must be set as a list indicating the explicit paddings at the start and end of each \`lhs\` spatial dimension. Otherwise, this must be empty. (If used,) Must be a list of size \`2 \* (number of lhs spatial dimensions)\`, where \`(explicit_padding\[2 \* i\], explicit_padding\[2 \* i + 1\])\` indicates \`(start_padding, end_padding)\` of \`spatial_dimensions\[i\]\`. |
|---|---|

#### public static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options)
**featureGroupCount**
(Long featureGroupCount)

<br />

##### Parameters

| featureGroupCount | The number of feature groups. Used for grouped convolutions. Must be a divisor of both \`lhs_feature\` and \`output_feature\`. |
|---|---|

#### public static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options)
**lhsDilation**
(List\<Long\> lhsDilation)

<br />

##### Parameters

| lhsDilation | The dilation factor to apply in each spatial dimension of \`lhs\`. Must be an empty list (default) or a list of size (number of \`lhs\` spatial dimensions). If empty list, the dilation for each \`lhs\` spatial dimension is set to 1. |
|---|---|

#### public static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options)
**lhsQuantizationAxis**
(Long lhsQuantizationAxis)

<br />

##### Parameters

| lhsQuantizationAxis | Indicates the dimension index of the tensor where per-axis quantization is applied for the slices along that dimension. If set to -1 (default), this indicates per-tensor quantization. For the \`lhs\`, only per-tensor quantization is supported. Thus, this must be set to -1. Other values will raise error at OpKernel construction. |
|---|---|

#### public [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<U\>
**output**
()

The output quantized tensor of \`Tout\`, same rank as \`lhs\` and \`rhs\`.

#### public static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options)
**outputQuantizationAxis**
(Long outputQuantizationAxis)

<br />

##### Parameters

| outputQuantizationAxis | Indicates the dimension index of the tensor where per-axis quantization is applied for the slices along that dimension. If set to -1 (default), this indicates per-tensor quantization. For the \`output\`, only per-tensor quantization or per-channel quantization along \`output_feature_dimension\` is supported. Thus, this must be set to -1 or \`dimension_numbers.output_feature_dimension\`. Other values will raise error at OpKernel construction. |
|---|---|

#### public static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options)
**rhsDilation**
(List\<Long\> rhsDilation)

<br />

##### Parameters

| rhsDilation | The dilation factor to apply in each spatial dimension of \`rhs\`. Must be an empty list (default) or a list of size (number of \`rhs\` spatial dimensions). If empty list, the dilation for each \`rhs\` spatial dimension is set to 1. |
|---|---|

#### public static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options)
**rhsQuantizationAxis**
(Long rhsQuantizationAxis)

<br />

##### Parameters

| rhsQuantizationAxis | Indicates the dimension index of the tensor where per-axis quantization is applied for the slices along that dimension. If set to -1 (default), this indicates per-tensor quantization. For the \`rhs\`, only per-tensor quantization or per-channel quantization along \`kernel_output_feature_dimension\` is supported. Thus, this must be set to -1 or \`dimension_numbers.kernel_output_feature_dimension\`. Other values will raise error at OpKernel construction. |
|---|---|

#### public static [UniformQuantizedConvolution.Options](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/UniformQuantizedConvolution.Options)
**windowStrides**
(List\<Long\> windowStrides)

<br />

##### Parameters

| windowStrides | The stride of the sliding window for each spatial dimension of \`lhs\`. Must be an empty list (default) or a list of size (number of spatial dimensions). If an empty list is provided, the stride for each spatial dimension is set to 1. |
|---|---|