class_docstr: A feature-extraction module that can be used for LocalNet, based on:
  `Weakly-supervised convolutional neural networks for multimodal image registration
  <https://doi.org/10.1016/j.media.2018.07.002>`_.
  `Label-driven weakly-supervised learning for multimodal deformable image registration
  <https://arxiv.org/abs/1711.01666>`_.
  
  Adapted from:
      DeepReg (https://github.com/DeepRegNet/DeepReg)
class_docstr_tok: ["A","feature-extraction","module","that","can","be","used","for","LocalNet",",","based","on",":","`","Weakly-supervised","convolutional","neural","networks","for","multimodal","image","registration","<","https",":","\/\/doi.org\/10.1016\/j.media.2018.07.002",">","`","_",".","`","Label-driven","weakly-supervised","learning","for","multimodal","deformable","image","registration","<","https",":","\/\/arxiv.org\/abs\/1711.01666",">","`","_",".","Adapted","from",":","DeepReg","(","https",":","\/\/github.com\/DeepRegNet\/DeepReg",")"]
docstr: Args:
  spatial_dims: number of spatial dimensions.
  in_channels: number of input channels.
  out_channels: number of output channels.
  act: activation type and arguments. Defaults to ReLU.
  kernel_initializer: kernel initializer. Defaults to None.
docstr_tok: ["Args",":","spatial_dims",":","number","of","spatial","dimensions",".","in_channels",":","number","of","input","channels",".","out_channels",":","number","of","output","channels",".","act",":","activation","type","and","arguments",".","Defaults","to","ReLU",".","kernel_initializer",":","kernel","initializer",".","Defaults","to","None","."]
code: def __init__(
      self,
      spatial_dims: int,
      in_channels: int,
      out_channels: int,
      act: tuple | str | None = "RELU",
      initializer: str = "kaiming_uniform",
  ) -> None:
      """
      Args:
      spatial_dims: number of spatial dimensions.
      in_channels: number of input channels.
      out_channels: number of output channels.
      act: activation type and arguments. Defaults to ReLU.
      kernel_initializer: kernel initializer. Defaults to None.
      """
      super().__init__()
      self.conv_block = get_conv_block(
          spatial_dims=spatial_dims,
          in_channels=in_channels,
          out_channels=out_channels,
          act=act,
          norm=None,
      )
      conv_type: type[nn.Conv1d | nn.Conv2d | nn.Conv3d] = Conv[
          Conv.CONV, spatial_dims
      ]
      for m in self.conv_block.modules():
          if isinstance(m, conv_type):
              if initializer == "kaiming_uniform":
                  nn.init.kaiming_normal_(torch.as_tensor(m.weight))
              elif initializer == "zeros":
                  nn.init.zeros_(torch.as_tensor(m.weight))
              else:
                  raise ValueError(
                      f"initializer {initializer} is not supported, "
                      "currently supporting kaiming_uniform and zeros"
                  )
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  import torch
  from torch import nn
  from torch.nn import functional
  from monai.networks.blocks import Convolution
  from monai.networks.layers import same_padding
  from monai.networks.layers.factories import Conv, Norm, Pool
label_desc: Use image node_id 1 to create a new LocalNetFeatureExtractorBlock object from inherited base classes: nn with example: obj = LocalNetFeatureExtractorBlock(spatial_dims, in_channels, out_channels, act, initializer)