class_docstr: Create a Unet-based generator
class_docstr_tok: ["Create","a","Unet-based","generator"]
docstr: Create a unetbasedmodel from the layer list options format - where
  each layer of the unet is specified separately
code: def _init_from_layer_list_format(
      self, opt, model_type, dataset, modules_lib
  ):
      """Create a unetbasedmodel from the layer list options format - where
      each layer of the unet is specified separately
      """
  
      self._get_factory(model_type, modules_lib)
  
      down_conv_layers = (
          opt.down_conv
          if type(opt.down_conv) is ListConfig
          else self._flatten_compact_options(opt.down_conv)
      )
      up_conv_layers = (
          opt.up_conv
          if type(opt.up_conv) is ListConfig
          else self._flatten_compact_options(opt.up_conv)
      )
      num_convs = len(down_conv_layers)
  
      unet_block = []
      contains_global = (
          hasattr(opt, "innermost") and opt.innermost is not None
      )
      if contains_global:
          assert len(down_conv_layers) + 1 == len(up_conv_layers)
  
          up_layer = dict(up_conv_layers[0])
          up_layer["up_conv_cls"] = getattr(
              modules_lib, up_layer["module_name"]
          )
  
          unet_block = UnetSkipConnectionBlock(
              args_up=up_layer,
              args_innermost=opt.innermost,
              modules_lib=modules_lib,
              innermost=True,
          )
  
      for index in range(num_convs - 1, 0, -1):
          down_layer = dict(down_conv_layers[index])
          up_layer = dict(up_conv_layers[num_convs - index])
  
          down_layer["down_conv_cls"] = getattr(
              modules_lib, down_layer["module_name"]
          )
          up_layer["up_conv_cls"] = getattr(
              modules_lib, up_layer["module_name"]
          )
  
          unet_block = UnetSkipConnectionBlock(
              args_up=up_layer,
              args_down=down_layer,
              modules_lib=modules_lib,
              submodule=unet_block,
          )
  
      up_layer = dict(up_conv_layers[-1])
      down_layer = dict(down_conv_layers[0])
      down_layer["down_conv_cls"] = getattr(
          modules_lib, down_layer["module_name"]
      )
      up_layer["up_conv_cls"] = getattr(
          modules_lib, up_layer["module_name"]
      )
      self.model = UnetSkipConnectionBlock(
          args_up=up_layer,
          args_down=down_layer,
          submodule=unet_block,
          outermost=True,
      )
  
      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 4 for calling the UnetBasedModel obj's underlying member method code with example usage: obj._init_from_layer_list_format(opt, model_type, dataset, modules_lib) without return types