(self, inputs, output, grad, weights, state, new_state, rng)
Custom backward pass to propagate gradients in a custom way.

    Args:
      inputs: Input tensors; can be a (possibly nested) tuple.
      output: The result of running this layer on inputs.
      grad: Gradient signal computed based on subsequent layers; its structure
          and shape must match output.
      weights: This layer's weights.
      state: This layer's state prior to the current forward pass.
      new_state: This layer's state after the current forward pass.
      rng: Single-use random number generator (JAX PRNG key).

    Returns:
      The custom gradient signal for the input. Note that we need to return
      a gradient for each argument of forward, so it will usually be a tuple
      of signals: the gradient for inputs and weights.
Custom backward pass to propagate gradients in a custom way.
Custom backward pass to propagate gradients in a custom way .
def backward(self, inputs, output, grad, weights, state, new_state, rng):
    """Custom backward pass to propagate gradients in a custom way.

    Args:
      inputs: Input tensors; can be a (possibly nested) tuple.
      output: The result of running this layer on inputs.
      grad: Gradient signal computed based on subsequent layers; its structure
          and shape must match output.
      weights: This layer's weights.
      state: This layer's state prior to the current forward pass.
      new_state: This layer's state after the current forward pass.
      rng: Single-use random number generator (JAX PRNG key).

    Returns:
      The custom gradient signal for the input. Note that we need to return
      a gradient for each argument of forward, so it will usually be a tuple
      of signals: the gradient for inputs and weights.
    """
    raise NotImplementedError
def backward ( self , inputs , output , grad , weights , state , new_state , rng ) : raise NotImplementedError