class_docstr: The class wraps monai layers with ram estimation. The ram_cost = total_ram/output_size is estimated.
  Here is the estimation:
   feature_size = output_size/out_channel
   total_ram = ram_cost * output_size
   total_ram = in_channel * feature_size (activation map) +
               in_channel * feature_size (convolution map) +
               out_channel * feature_size (normalization)
             = (2*in_channel + out_channel) * output_size/out_channel
   ram_cost = total_ram/output_size = 2 * in_channel/out_channel + 1
class_docstr_tok: ["The","class","wraps","monai","layers","with","ram","estimation",".","The","ram_cost","=","total_ram\/output_size","is","estimated",".","Here","is","the","estimation",":","feature_size","=","output_size\/out_channel","total_ram","=","ram_cost","*","output_size","total_ram","=","in_channel","*","feature_size","(","activation","map",")","+","in_channel","*","feature_size","(","convolution","map",")","+","out_channel","*","feature_size","(","normalization",")","=","(","2","*","in_channel","+","out_channel",")","*","output_size\/out_channel","ram_cost","=","total_ram\/output_size","=","2","*","in_channel\/out_channel","+","1"]
code: def __init__(
      self,
      in_channel: int,
      out_channel: int,
      kernel_size: int,
      padding: int,
      spatial_dims: int = 3,
      act_name: tuple | str = "RELU",
      norm_name: tuple | str = ("INSTANCE", {"affine": True}),
  ):
      super().__init__(
          in_channel,
          out_channel,
          kernel_size,
          padding,
          spatial_dims,
          act_name,
          norm_name,
      )
      self.ram_cost = 1 + in_channel / out_channel * 2
  
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 _ActiConvNormBlockWithRAMCost object from inherited base classes: ActiConvNormBlock with example: obj = _ActiConvNormBlockWithRAMCost(in_channel, out_channel, kernel_size, padding, spatial_dims, act_name, norm_name)