<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/models/blob/v2.20.0/official/vision/modeling/decoders/aspp.py#L28-L155) |

Creates an Atrous Spatial Pyramid Pooling (ASPP) layer.

    tfm.vision.decoders.ASPP(
        level: int,
        dilation_rates: List[int],
        num_filters: int = 256,
        pool_kernel_size: Optional[int] = None,
        use_sync_bn: bool = False,
        norm_momentum: float = 0.99,
        norm_epsilon: float = 0.001,
        activation: str = 'relu',
        dropout_rate: float = 0.0,
        kernel_initializer: str = 'VarianceScaling',
        kernel_regularizer: Optional[tf_keras.regularizers.Regularizer] = None,
        interpolation: str = 'bilinear',
        use_depthwise_convolution: bool = False,
        spp_layer_version: str = 'v1',
        output_tensor: bool = False,
        **kwargs
    )

<br />

| ## Args ||
|---|---|
| level: An `int` level to apply ASPP. dilation_rates: A `list` of dilation rates. num_filters: An `int` number of output filters in ASPP. pool_kernel_size: A `list` of \[height, width\] of pooling kernel size or None. Pooling size is with respect to original image size, it will be scaled down by 2\*\*level. If None, global average pooling is used. use_sync_bn: A `bool`. If True, use synchronized batch normalization. norm_momentum: A `float` of normalization momentum for the moving average. norm_epsilon: A `float` added to variance to avoid dividing by zero. activation: A `str` activation to be used in ASPP. dropout_rate: A `float` rate for dropout regularization. kernel_initializer: A `str` name of kernel_initializer for convolutional layers. kernel_regularizer: A `tf_keras.regularizers.Regularizer` object for Conv2D. Default is None. interpolation: A `str` of interpolation method. It should be one of `bilinear`, `nearest`, `bicubic`, `area`, `lanczos3`, `lanczos5`, `gaussian`, or `mitchellcubic`. use_depthwise_convolution: If True depthwise separable convolutions will be added to the Atrous spatial pyramid pooling. ||
| `spp_layer_version` | A `str` of spatial pyramid pooling layer version. |
| `output_tensor` | Whether to output a single tensor or a dictionary of tensor. Default is false. \*\*kwargs: Additional keyword arguments to be passed. |

<br />

## Methods

### `call`

[View source](https://github.com/tensorflow/models/blob/v2.20.0/official/vision/modeling/decoders/aspp.py#L122-L147)

    call(
        inputs: TensorMapUnion
    ) -> TensorMapUnion

Calls the Atrous Spatial Pyramid Pooling (ASPP) layer on an input.

The output of ASPP will be a dict of {`level`, [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor)} even if only one
level is present, if output_tensor is false. Hence, this will be compatible
with the rest of the segmentation model interfaces.
If output_tensor is true, a single tensot is output.

<br />

<br />

<br />

| Args ||
|---|---|
| `inputs` | A [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor) of shape \[batch, height_l, width_l, filter_size\] or a `dict` of [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor) where <br /> - key: A `str` of the level of the multilevel feature maps. - values: A [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor) of shape \[batch, height_l, width_l, filter_size\]. |

<br />

<br />

| Returns ||
|---|---|
| A [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor) of shape \[batch, height_l, width_l, filter_size\] or a `dict` of [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor) where <br /> - key: A `str` of the level of the multilevel feature maps. - values: A [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor) of output of ASPP module. ||

<br />