code: def __init__(
      self,
      n_in,
      n_out,
      dropout=0,
      rnn_dropout=0,
      bidirectional=False,
      use_tanh=1,
      use_relu=0,
  ):
      super(SRUCell, self).__init__()
      self.n_in = n_in
      self.n_out = n_out
      self.rnn_dropout = rnn_dropout
      self.dropout = dropout
      self.bidirectional = bidirectional
      self.activation_type = 2 if use_relu else (1 if use_tanh else 0)
  
      out_size = n_out * 2 if bidirectional else n_out
      k = 4 if n_in != out_size else 3
      self.size_per_dir = n_out * k
      self.weight = nn.Parameter(
          torch.Tensor(
              n_in,
              self.size_per_dir * 2
              if bidirectional
              else self.size_per_dir,
          )
      )
      self.bias = nn.Parameter(
          torch.Tensor(n_out * 4 if bidirectional else n_out * 2)
      )
      self.init_weight()
  
imports: import subprocess
  import platform
  import os
  import re
  import configargparse
  import torch
  import torch.nn
  from torch.autograd import Function
  from torch.cuda.amp import custom_fwd, custom_bwd
  from collections import namedtuple
label_desc: Use image node_id 1 to create a new SRUCell object from inherited base classes: nn with example: obj = SRUCell(n_in, n_out, dropout, rnn_dropout, bidirectional, use_tanh, use_relu)