docstr: Run forward pass. This will be called by both functions <optimize_parameters> and <test>.
docstr_tok: ["Run","forward","pass",".","This","will","be","called","by","both","functions","<","optimize_parameters",">","and","<","test",">","."]
code: def forward(self, *args, **kwargs) -> Any:
      """Run forward pass. This will be called by both functions <optimize_parameters> and <test>."""
      stack_down = []
  
      data = self.input
      for i in range(len(self.down_modules) - 1):
          data = self.down_modules[i](
              data, precomputed=self.pre_computed
          )
          stack_down.append(data)
  
      data = self.down_modules[-1](data, precomputed=self.pre_computed)
      innermost = False
  
      if not isinstance(self.inner_modules[0], Identity):
          stack_down.append(data)
          data = self.inner_modules[0](data)
          innermost = True
  
      for i in range(len(self.up_modules)):
          if i == 0 and innermost:
              data = self.up_modules[i]((data, stack_down.pop()))
          else:
              data = self.up_modules[i](
                  (data, stack_down.pop()), precomputed=self.upsample
              )
  
      last_feature = data.x
      if self._use_category:
          self.output = self.FC_layer(last_feature, self.category)
      else:
          self.output = self.FC_layer(last_feature)
  
      if self.labels is not None:
          self.compute_loss()
  
      self.data_visual = self.input
      self.data_visual.pred = torch.max(self.output, -1)[1]
      return self.output
  
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 3 for calling the PPNet obj's underlying member method code with example usage: obj.forward() and returns: self