tfm.vision.decoders.ASPP
Stay organized with collections
Save and categorize content based on your preferences.
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
)
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.
|
Methods
call
View source
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} 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.
| Args |
inputs
|
A tf.Tensor of shape [batch, height_l, width_l, filter_size] or
a dict of tf.Tensor where
- key: A
str of the level of the multilevel feature maps.
- values: A
tf.Tensor of shape [batch, height_l, width_l,
filter_size].
|
| Returns |
A tf.Tensor of shape [batch, height_l, width_l, filter_size] or a dict
of tf.Tensor where
- key: A
str of the level of the multilevel feature maps.
- values: A
tf.Tensor of output of ASPP module.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2026-11-06 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-11-06 UTC."],[],[]]