class_docstr: Instance of the final searched architecture. Only used in re-training/inference stage.
class_docstr_tok: ["Instance","of","the","final","searched","architecture",".","Only","used","in","re-training\/inference","stage","."]
docstr: Initialize DiNTS topology search space of neural architectures.
docstr_tok: ["Initialize","DiNTS","topology","search","space","of","neural","architectures","."]
code: def __init__(
      self,
      arch_code=None,
      channel_mul: float = 1.0,
      cell=Cell,
      num_blocks: int = 6,
      num_depths: int = 3,
      spatial_dims: int = 3,
      act_name: tuple | str = "RELU",
      norm_name: tuple | str = ("INSTANCE", {"affine": True}),
      use_downsample: bool = True,
      device: str = "cpu",
  ):
      """
      Initialize DiNTS topology search space of neural architectures.
      """
      if arch_code is None:
          warnings.warn("arch_code not provided when not searching.")
  
      super().__init__(
          arch_code=arch_code,
          channel_mul=channel_mul,
          cell=cell,
          num_blocks=num_blocks,
          num_depths=num_depths,
          spatial_dims=spatial_dims,
          act_name=act_name,
          norm_name=norm_name,
          use_downsample=use_downsample,
          device=device,
      )
  
imports: from __future__ import annotations
  import datetime
  import warnings
  from typing import Optional
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from monai.networks.blocks.dints_block import ActiConvNormBlock, FactorizedIncreaseBlock, FactorizedReduceBlock, P3DActiConvNormBlock
  from monai.networks.layers.factories import Conv
  from monai.networks.layers.utils import get_act_layer, get_norm_layer
  from monai.utils import optional_import
label_desc: Use image node_id 1 to create a new TopologyInstance object from inherited base classes: TopologyConstruction with example: obj = TopologyInstance(arch_code, channel_mul, cell, num_blocks, num_depths, spatial_dims, act_name, norm_name, use_downsample, device)