class_docstr: Independent GLU block, specific to each step
class_docstr_tok: ["Independent","GLU","block",",","specific","to","each","step"]
code: def __init__(
      self,
      input_dim,
      output_dim,
      n_glu=2,
      first=False,
      shared_layers=None,
      virtual_batch_size=128,
      momentum=0.02,
  ):
      super(GLU_Block, self).__init__()
      self.first = first
      self.shared_layers = shared_layers
      self.n_glu = n_glu
      self.glu_layers = torch.nn.ModuleList()
  
      params = {
          "virtual_batch_size": virtual_batch_size,
          "momentum": momentum,
      }
  
      fc = shared_layers[0] if shared_layers else None
      self.glu_layers.append(
          GLU_Layer(input_dim, output_dim, fc=fc, **params)
      )
      for glu_id in range(1, self.n_glu):
          fc = shared_layers[glu_id] if shared_layers else None
          self.glu_layers.append(
              GLU_Layer(output_dim, output_dim, fc=fc, **params)
          )
  
imports: import torch
  from torch.nn import Linear, BatchNorm1d, ReLU
  import numpy
  from pytorch_tabnet import sparsemax
label_desc: Use image node_id 1 to create a new GLU_Block object from inherited base classes: torch.nn with example: obj = GLU_Block(input_dim, output_dim, n_glu, first, shared_layers, virtual_batch_size, momentum)