parameters: (model: AbstractARNN, inputs: Array, index: int)
return_statement: return p
docstring: Computes the conditional probabilities for a site to take a given value.
      See `AbstractARNN._conditional`.
docstring_summary: Computes the conditional probabilities for a site to take a given value.
      See `AbstractARNN._conditional`.
docstring_tokens: Computes the conditional probabilities for a site to take a given value . See AbstractARNN . _conditional .
function: def _conditional(model: AbstractARNN, inputs: Array, index: int) -> Array:
      """
      Computes the conditional probabilities for a site to take a given value.
      See `AbstractARNN._conditional`.
      """
      if inputs.ndim == 1:
          inputs = jnp.expand_dims(inputs, axis=0)
  
      # When `index = 0`, it doesn't matter which site we take
      x = inputs[:, index - 1, None]
  
      for i in range(model.layers):
          if i > 0:
              x = model.activation(x)
          x = model._layers[i].update_site(x, index)
  
      log_psi = _normalize(x, model.machine_pow)
      p = jnp.exp(model.machine_pow * log_psi.real)
      return p
function_tokens: def _conditional ( model : AbstractARNN , inputs : Array , index : int ) -> Array : if inputs . ndim == 1 : inputs = jnp . expand_dims ( inputs , axis = 0 ) # When `index = 0`, it doesn't matter which site we take x = inputs [ : , index - 1 , None ] for i in range ( model . layers ) : if i > 0 : x = model . activation ( x ) x = model . _layers [ i ] . update_site ( x , index ) log_psi = _normalize ( x , model . machine_pow ) p = jnp . exp ( model . machine_pow * log_psi . real ) return p