class_docstr: General wrapper for layers
class_docstr_tok: ["General","wrapper","for","layers"]
code: def __init__(
      self,
      name,
      dim_in,
      dim_out,
      has_act=True,
      has_bn=True,
      has_l2norm=False,
      **kwargs,
  ):
      super(GeneralLayer, self).__init__()
      self.has_l2norm = has_l2norm
      has_bn = has_bn and cfg.gnn.batchnorm
      self.layer = layer_dict[name](
          dim_in, dim_out, bias=not has_bn, **kwargs
      )
      layer_wrapper = []
      if has_bn:
          layer_wrapper.append(
              nn.BatchNorm1d(
                  dim_out, eps=cfg.bn.eps, momentum=cfg.bn.mom
              )
          )
      if cfg.gnn.dropout > 0:
          layer_wrapper.append(
              nn.Dropout(p=cfg.gnn.dropout, inplace=cfg.mem.inplace)
          )
      if has_act:
          layer_wrapper.append(act_dict[cfg.gnn.act])
      self.post_layer = nn.Sequential(*layer_wrapper)
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  import torch_geometric
  import graphgym.register
  from graphgym.config import cfg
  from graphgym.contrib.layer.generalconv import GeneralConvLayer, GeneralEdgeConvLayer
  from graphgym.models.act import act_dict
label_desc: Use image node_id 1 to create a new GeneralLayer object from inherited base classes: nn with example: obj = GeneralLayer(name, dim_in, dim_out, has_act, has_bn, has_l2norm)