class_docstr: generic wrapper around conv-layers to avoid 2D vs. 3D distinguishing in code.
docstr: :param c_in: number of in_channels.
  :param c_out: number of out_channels.
  :param ks: kernel size.
  :param pad: pad size.
  :param stride: kernel stride.
  :param norm: string specifying type of feature map normalization. If None, no normalization is applied.
  :param relu: string specifying type of nonlinearity. If None, no nonlinearity is applied.
  :return: convolved feature_map.
code: def __call__(
      self, c_in, c_out, ks, pad=0, stride=1, norm=None, relu="relu"
  ):
      """
      :param c_in: number of in_channels.
      :param c_out: number of out_channels.
      :param ks: kernel size.
      :param pad: pad size.
      :param stride: kernel stride.
      :param norm: string specifying type of feature map normalization. If None, no normalization is applied.
      :param relu: string specifying type of nonlinearity. If None, no nonlinearity is applied.
      :return: convolved feature_map.
      """
      if self.dim == 2:
          conv = nn.Conv2d(
              c_in, c_out, kernel_size=ks, padding=pad, stride=stride
          )
          if norm is not None:
              if norm == "instance_norm":
                  norm_layer = nn.InstanceNorm2d(c_out)
              elif norm == "batch_norm":
                  norm_layer = nn.BatchNorm2d(c_out)
              else:
                  raise ValueError(
                      "norm type as specified in configs is not implemented..."
                  )
              conv = nn.Sequential(conv, norm_layer)
  
      else:
          conv = nn.Conv3d(
              c_in, c_out, kernel_size=ks, padding=pad, stride=stride
          )
          if norm is not None:
              if norm == "instance_norm":
                  norm_layer = nn.InstanceNorm3d(c_out)
              elif norm == "batch_norm":
                  norm_layer = nn.BatchNorm3d(c_out)
              else:
                  raise ValueError(
                      "norm type as specified in configs is not implemented... {}".format(
                          norm
                      )
                  )
              conv = nn.Sequential(conv, norm_layer)
  
      if relu is not None:
          if relu == "relu":
              relu_layer = nn.ReLU(inplace=True)
          elif relu == "leaky_relu":
              relu_layer = nn.LeakyReLU(inplace=True)
          else:
              raise ValueError(
                  "relu type as specified in configs is not implemented..."
              )
          conv = nn.Sequential(conv, relu_layer)
  
      return conv
  
imports: import numpy
  import scipy.misc
  import scipy.ndimage
  import torch
  from torch.autograd import Variable
  import torch.nn
label_desc: Use image node_id 2 for calling the NDConvGenerator obj's underlying member method code with example usage: obj.__call__(c_in, c_out, ks, pad, stride, norm, relu) and returns: conv