class_docstr: This class defines the segmentation head in `DeepLabv3 architecture <https://arxiv.org/abs/1706.05587>`_
  Args:
      opts: command-line arguments
      enc_conf (Dict): Encoder input-output configuration at each spatial level
      use_l5_exp (Optional[bool]): Use features from expansion layer in Level5 in the encoder
class_docstr_tok: ["This","class","defines","the","segmentation","head","in","`","DeepLabv3","architecture","<","https",":","\/\/arxiv.org\/abs\/1706.05587",">","`","_","Args",":","opts",":","command-line","arguments","enc_conf","(","Dict",")",":","Encoder","input-output","configuration","at","each","spatial","level","use_l5_exp","(","Optional","[","bool","]",")",":","Use","features","from","expansion","layer","in","Level5","in","the","encoder"]
code: def __init__(
      self,
      opts,
      enc_conf: Dict,
      use_l5_exp: Optional[bool] = False,
      *args,
      **kwargs,
  ) -> None:
      atrous_rates = getattr(
          opts, "model.segmentation.deeplabv3.aspp_rates", (6, 12, 18)
      )
      out_channels = getattr(
          opts, "model.segmentation.deeplabv3.aspp_out_channels", 256
      )
      is_sep_conv = getattr(
          opts, "model.segmentation.deeplabv3.aspp_sep_conv", False
      )
      dropout = getattr(
          opts, "model.segmentation.deeplabv3.aspp_dropout", 0.1
      )
  
      super().__init__(
          opts=opts, enc_conf=enc_conf, use_l5_exp=use_l5_exp
      )
  
      self.aspp = nn.Sequential()
      aspp_in_channels = (
          self.enc_l5_channels
          if not self.use_l5_exp
          else self.enc_l5_exp_channels
      )
      self.aspp.add_module(
          name="aspp_layer",
          module=ASPP(
              opts=opts,
              in_channels=aspp_in_channels,
              out_channels=out_channels,
              atrous_rates=atrous_rates,
              is_sep_conv=is_sep_conv,
              dropout=dropout,
          ),
      )
  
      self.classifier = ConvLayer2d(
          opts=opts,
          in_channels=out_channels,
          out_channels=self.n_seg_classes,
          kernel_size=1,
          stride=1,
          use_norm=False,
          use_act=False,
          bias=True,
      )
  
      self.reset_head_parameters(opts=opts)
  
file_path: ml-cvnets/cvnets/models/segmentation/heads/deeplabv3.py
imports: import argparse
  from typing import Dict, Optional, Tuple
  from torch import Tensor, nn
  from cvnets.layers import ConvLayer2d
  from cvnets.misc.init_utils import initialize_weights
  from cvnets.models import MODEL_REGISTRY
  from cvnets.models.segmentation.heads.base_seg_head import BaseSegHead
  from cvnets.modules import ASPP
  from options.parse_args import JsonValidator
label_desc: Use image node_id 1 to create a new DeeplabV3 object from inherited base classes: BaseSegHead with example: obj = DeeplabV3(opts, enc_conf, use_l5_exp)