class_docstr: A single step of a Long-Short Term Memory unit (LSTM).
  
  !!! example
  
      This is often used by wrapping it into a `jax.lax.scan`. For example:
  
      ```python
      class Model(Module):
          cell: LSTMCell
  
          def __init__(self, ...):
              self.cell = LSTMCell(...)
  
          def __call__(self, xs):
              scan_fn = lambda state, input: (cell(input, state), None)
              init_state = (jnp.zeros(self.cell.hidden_size),
                            jnp.zeros(self.cell.hidden_size))
              final_state, _ = jax.lax.scan(scan_fn, init_state, xs)
              return final_state
      ```
docstr: **Arguments:**
  
  - `input`: The input, which should be a JAX array of shape `(input_size,)`.
  - `hidden`: The hidden state, which should be a 2-tuple of JAX arrays, each of
      shape `(hidden_size,)`.
  - `key`: Ignored; provided for compatibility with the rest of the Equinox API.
      (Keyword only argument.)
  
  **Returns:**
  
  The updated hidden state, which is a 2-tuple of JAX arrays, each of shape
  `(hidden_size,)`.
docstr_tok: ["*","*","Arguments",":","*","*","-","`","input","`",":","The","input",",","which","should","be","a","JAX","array","of","shape","`","(","input_size",",",")","`",".","-","`","hidden","`",":","The","hidden","state",",","which","should","be","a","2-tuple","of","JAX","arrays",",","each","of","shape","`","(","hidden_size",",",")","`",".","-","`","key","`",":","Ignored",";","provided","for","compatibility","with","the","rest","of","the","Equinox","API",".","(","Keyword","only","argument",".",")","*","*","Returns",":","*","*","The","updated","hidden","state",",","which","is","a","2-tuple","of","JAX","arrays",",","each","of","shape","`","(","hidden_size",",",")","`","."]
code: def __call__(self, input, hidden, *, key=None):
      """**Arguments:**
  
      - `input`: The input, which should be a JAX array of shape `(input_size,)`.
      - `hidden`: The hidden state, which should be a 2-tuple of JAX arrays, each of
          shape `(hidden_size,)`.
      - `key`: Ignored; provided for compatibility with the rest of the Equinox API.
          (Keyword only argument.)
  
      **Returns:**
  
      The updated hidden state, which is a 2-tuple of JAX arrays, each of shape
      `(hidden_size,)`.
      """
      h, c = hidden
      lin = self.weight_ih @ input + self.weight_hh @ h
      if self.use_bias:
          lin = lin + self.bias
      i, f, g, o = jnp.split(lin, 4)
      i = jnn.sigmoid(i)
      f = jnn.sigmoid(f)
      g = jnn.tanh(g)
      o = jnn.sigmoid(o)
      c = f * c + i * g
      h = o * jnn.tanh(c)
      return (h, c)
  
file_path: equinox/equinox/nn/_rnn.py
imports: import math
  from typing import Optional
  import jax
  import jax.nn
  import jax.numpy
  import jax.random
  from jaxtyping import Array, PRNGKeyArray
  from .._module import field, Module
label_desc: Use image node_id 2 for calling the LSTMCell obj's underlying member method code with example usage: obj.__call__(input, hidden) and returns: h,  c