class_docstr: PointNet2 with multi-scale grouping
  metric learning siamese network that uses feature propogation layers
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
      if hasattr(self, "loss"):
          self.loss.backward()
  
imports: import torch
  import torch.nn.functional
  from torch.nn import Linear
  from torch.nn import Sequential
  from torch_geometric.data import Data
  import logging
  from torch_points3d.core.losses import *
  from torch_points3d.modules.pointnet2 import *
  from torch_points3d.core.common_modules import MLP
  from torch_points3d.models.base_architectures import BackboneBasedModel
  from torch_points3d.models.base_architectures import UnetBasedModel
  from torch_points3d.core.common_modules.dense_modules import Conv1D
  from torch_points3d.core.common_modules.base_modules import Seq
  from torch_points3d.models.registration.base import FragmentBaseModel
label_desc: Use image node_id 5 for calling the PatchPointNet2_D obj's underlying member method code with example usage: obj.backward() without return types