docstr: Calculate losses, gradients, and update network weights; called in every training iteration
docstr_tok: ["Calculate","losses",",","gradients",",","and","update","network","weights",";","called","in","every","training","iteration"]
code: def backward(self):
      """Calculate losses, gradients, and update network weights; called in every training iteration"""
      # caculate the intermediate results if necessary; here self.output has been computed during function <forward>
      # calculate loss given the input and intermediate results
      self.loss.backward()
  
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 5 for calling the PPNet obj's underlying member method code with example usage: obj.backward() without return types