class_docstr: S-LSTM unit.
  
  It has four inputs (c1, c2, x1, x2) and two outputs (c, h), where c
  indicates the cell state. x1 and x2 must have four times channels compared
  to the number of units.
class_docstr_tok: ["S-LSTM","unit",".","It","has","four","inputs","(","c1",",","c2",",","x1",",","x2",")","and","two","outputs","(","c",",","h",")",",","where","c","indicates","the","cell","state",".","x1","and","x2","must","have","four","times","channels","compared","to","the","number","of","units","."]
code: def forward(self, inputs):
      self.retain_inputs((0, 1, 2, 3))
      c_prev1, c_prev2, x1, x2 = inputs
      a1, i1, f1, o1 = _extract_gates(x1)
      a2, i2, f2, o2 = _extract_gates(x2)
  
      if isinstance(x1, numpy.ndarray):
          a1 = numpy.tanh(a1)
          i1 = _sigmoid(i1)
          f1 = _sigmoid(f1)
  
          a2 = numpy.tanh(a2)
          i2 = _sigmoid(i2)
          f2 = _sigmoid(f2)
  
          o = _sigmoid(o1 + o2)
          c = a1 * i1 + a2 * i2 + f1 * c_prev1 + f2 * c_prev2
  
          h = o * numpy.tanh(c)
      else:
          c, h = cuda.elementwise(
              """T c_prev1, T a1, T i1, T f1, T o1,
                     T c_prev2, T a2, T i2, T f2, T o2""",
              "T c, T h",
              """
                      COMMON_ROUTINE;
                      c = aa1 * ai1 + af1 * c_prev1 + aa2 * ai2 + af2 * c_prev2;
                      h = ao * tanh(c);
                  """,
              "slstm_fwd",
              preamble=_preamble,
          )(c_prev1, a1, i1, f1, o1, c_prev2, a2, i2, f2, o2)
      self.retain_outputs((0,))
      return c, h
  
imports: import numpy
  import six
  from chainer import backend
  from chainer.backends import cuda
  from chainer.backends import intel64
  from chainer import function
  from chainer import function_node
  from chainer.utils import type_check
  import chainerx
label_desc: Use image node_id 3 for calling the SLSTM obj's underlying member method code with example usage: obj.forward(inputs) and returns: c,  h