class_docstr: Create a Unet-based generator
class_docstr_tok: ["Create","a","Unet-based","generator"]
docstr: Create a unetbasedmodel from the compact options format - where the
  same convolution is given for each layer, and arguments are given
  in lists
code: def _init_from_compact_format(
      self, opt, model_type, dataset, modules_lib
  ):
      """Create a unetbasedmodel from the compact options format - where the
      same convolution is given for each layer, and arguments are given
      in lists
      """
      num_convs = len(opt.down_conv.down_conv_nn)
  
      # Factory for creating up and down modules
      factory_module_cls = self._get_factory(model_type, modules_lib)
      down_conv_cls_name = opt.down_conv.module_name
      up_conv_cls_name = opt.up_conv.module_name
      self._factory_module = factory_module_cls(
          down_conv_cls_name, up_conv_cls_name, modules_lib
      )  # Create the factory object
      # construct unet structure
      contains_global = (
          hasattr(opt, "innermost") and opt.innermost is not None
      )
      if contains_global:
          assert len(opt.down_conv.down_conv_nn) + 1 == len(
              opt.up_conv.up_conv_nn
          )
  
          args_up = self._fetch_arguments_from_list(opt.up_conv, 0)
          args_up["up_conv_cls"] = self._factory_module.get_module("UP")
  
          unet_block = UnetSkipConnectionBlock(
              args_up=args_up,
              args_innermost=opt.innermost,
              modules_lib=modules_lib,
              submodule=None,
              innermost=True,
          )  # add the innermost layer
      else:
          unet_block = Identity()
  
      if num_convs > 1:
          for index in range(num_convs - 1, 0, -1):
              args_up, args_down = self._fetch_arguments_up_and_down(
                  opt, index
              )
              unet_block = UnetSkipConnectionBlock(
                  args_up=args_up,
                  args_down=args_down,
                  submodule=unet_block,
              )
              self._save_sampling_and_search(unet_block)
      else:
          index = num_convs
  
      index -= 1
      args_up, args_down = self._fetch_arguments_up_and_down(opt, index)
      self.model = UnetSkipConnectionBlock(
          args_up=args_up,
          args_down=args_down,
          submodule=unet_block,
          outermost=True,
      )  # add the outermost layer
      self._save_sampling_and_search(self.model)
  
imports: from torch import nn
  from torch_geometric.nn import global_max_pool, global_mean_pool, fps, radius, knn_interpolate
  from torch.nn import Linear, ReLU, LeakyReLU, BatchNorm1d, Dropout
  from omegaconf.listconfig import ListConfig
  from omegaconf.dictconfig import DictConfig
  import logging
  import copy
  from torch_points3d.datasets.base_dataset import BaseDataset
  from torch_points3d.models.base_model import BaseModel
  from torch_points3d.core.common_modules.base_modules import Identity
  from torch_points3d.utils.config import is_list
label_desc: Use image node_id 3 for calling the UnetBasedModel obj's underlying member method code with example usage: obj._init_from_compact_format(opt, model_type, dataset, modules_lib) without return types