code: def __init__(self, option, model_type, dataset, modules):
      # Extract parameters from the dataset
      self._num_classes = dataset.num_classes
      self._weight_classes = dataset.weight_classes
      self._use_category = getattr(option, "use_category", False)
      if self._use_category:
          if not dataset.class_to_segments:
              raise ValueError(
                  "The dataset needs to specify a class_to_segments property when using category information for segmentation"
              )
          self._class_to_seg = dataset.class_to_segments
          self._num_categories = len(self._class_to_seg)
          log.info(
              "Using category information for the predictions with %i categories",
              self._num_categories,
          )
      else:
          self._num_categories = 0
  
      # Assemble encoder / decoder
      UnwrappedUnetBasedModel.__init__(
          self, option, model_type, dataset, modules
      )
  
      # Build final MLP
      last_mlp_opt = option.mlp_cls
      if self._use_category:
          self.FC_layer = MultiHeadClassifier(
              last_mlp_opt.nn[0],
              self._class_to_seg,
              dropout_proba=last_mlp_opt.dropout,
              bn_momentum=last_mlp_opt.bn_momentum,
          )
      else:
          in_feat = last_mlp_opt.nn[0] + self._num_categories
          self.FC_layer = Sequential()
          for i in range(1, len(last_mlp_opt.nn)):
              self.FC_layer.add_module(
                  str(i),
                  Sequential(
                      *[
                          Linear(
                              in_feat, last_mlp_opt.nn[i], bias=False
                          ),
                          FastBatchNorm1d(
                              last_mlp_opt.nn[i],
                              momentum=last_mlp_opt.bn_momentum,
                          ),
                          LeakyReLU(0.2),
                      ]
                  ),
              )
              in_feat = last_mlp_opt.nn[i]
  
          if last_mlp_opt.dropout:
              self.FC_layer.add_module(
                  "Dropout", Dropout(p=last_mlp_opt.dropout)
              )
  
          self.FC_layer.add_module(
              "Class", Lin(in_feat, self._num_classes, bias=False)
          )
          self.FC_layer.add_module("Softmax", nn.LogSoftmax(-1))
      self.loss_names = ["loss_seg"]
  
      self.visual_names = ["data_visual"]
      self.init_weights()
  
imports: from typing import Any
  import logging
  from omegaconf.dictconfig import DictConfig
  from omegaconf.listconfig import ListConfig
  from torch.nn import Sequential, Dropout, Linear
  import torch.nn.functional
  from torch import nn
  from .base import Segmentation_MP
  from torch_points3d.core.common_modules import FastBatchNorm1d
  from torch_points3d.modules.PPNet import *
  from torch_points3d.core.base_conv.partial_dense import *
  from torch_points3d.core.common_modules import MultiHeadClassifier, Identity
  from torch_points3d.models.base_model import BaseModel
  from torch_points3d.models.base_architectures.unet import UnwrappedUnetBasedModel
  from torch_points3d.datasets.multiscale_data import MultiScaleBatch
  from torch_points3d.datasets.segmentation import IGNORE_LABEL
label_desc: Use image node_id 1 to create a new PPNet object from inherited base classes: UnwrappedUnetBasedModel with example: obj = PPNet(option, model_type, dataset, modules)