src/transformers/models/mobilevit/modeling_tf_mobilevit.py/TFMobileViTASPP/__init__
class TFMobileViTASPP:    def __init__(self, config: MobileViTConfig, **kwargs) -> None:
        super().__init__(**kwargs)

        out_channels = config.aspp_out_channels

        if len(config.atrous_rates) != 3:
            raise ValueError("Expected 3 values for atrous_rates")

        self.convs = []

        in_projection = TFMobileViTConvLayer(
            config,
            out_channels=out_channels,
            kernel_size=1,
            use_activation="relu",
            name="convs.0",
        )
        self.convs.append(in_projection)

        self.convs.extend(
            [
                TFMobileViTConvLayer(
                    config,
                    out_channels=out_channels,
                    kernel_size=3,
                    dilation=rate,
                    use_activation="relu",
                    name=f"convs.{i + 1}",
                )
                for i, rate in enumerate(config.atrous_rates)
            ]
        )

        pool_layer = TFMobileViTASPPPooling(config, out_channels, name=f"convs.{len(config.atrous_rates) + 1}")
        self.convs.append(pool_layer)

        self.project = TFMobileViTConvLayer(
            config,
            out_channels=out_channels,
            kernel_size=1,
            use_activation="relu",
            name="project",
        )

        self.dropout = tf.keras.layers.Dropout(config.aspp_dropout_prob)