class_docstr: Parametric Rectified Linear Unit (PReLU) activation function.
  
  Note that PReLU is a Flax layer and not a simple activation function, so
  it needs to be initialized before being called.
  
  Example usage::
    >>> import flax.linen as nn
  
    >>> class MLP(nn.Module):
    ...   @nn.compact
    ...   def __call__(self, x):
    ...     x = nn.Dense(2)(x)
    ...     x = nn.PReLU()(x) # initialized
    ...     return x
  
  Attributes:
    param_dtype: the dtype passed to parameter initializers (default: float32).
    negative_slope_init: the value to initialize the negative slope
      (default 0.01).
class_docstr_tok: ["Parametric","Rectified","Linear","Unit","(","PReLU",")","activation","function",".","Note","that","PReLU","is","a","Flax","layer","and","not","a","simple","activation","function",",","so","it","needs","to","be","initialized","before","being","called",".","Example","usage",":",":",">",">",">","import","flax.linen","as","nn",">",">",">","class","MLP","(","nn.Module",")",":","...","@","nn.compact","...","def","__call__","(","self",",","x",")",":","...","x","=","nn.Dense","(","2",")","(","x",")","...","x","=","nn.PReLU","(",")","(","x",")","#","initialized","...","return","x","Attributes",":","param_dtype",":","the","dtype","passed","to","parameter","initializers","(","default",":","float32",")",".","negative_slope_init",":","the","value","to","initialize","the","negative","slope","(","default","0.01",")","."]
docstr: Applies an activation to the inputs.
  
  Args:
    inputs: the nd-array to apply the activation function to.
  
  Returns:
    The transformed input.
docstr_tok: ["Applies","an","activation","to","the","inputs",".","Args",":","inputs",":","the","nd-array","to","apply","the","activation","function","to",".","Returns",":","The","transformed","input","."]
code: def __call__(self, inputs: Array) -> Array:
      """Applies an activation to the inputs.
  
      Args:
        inputs: the nd-array to apply the activation function to.
  
      Returns:
        The transformed input.
      """
      negative_slope = self.param(
          "negative_slope",
          lambda k: jnp.asarray(
              self.negative_slope_init, self.param_dtype
          ),
      )
      return jnp.where(
          inputs >= 0,
          inputs,
          jnp.asarray(negative_slope, inputs.dtype) * inputs,
      )
  
imports: from typing import Any, Optional
  from flax.linen.module import compact
  from flax.linen.module import Module
  from flax.linen.linear import Dense
  from jax.nn import celu
  from jax.nn import elu
  from jax.nn import gelu
  from jax.nn import glu
  from jax.nn import hard_sigmoid
  from jax.nn import hard_silu
  from jax.nn import hard_swish
  from jax.nn import hard_tanh
  from jax.nn import leaky_relu
  from jax.nn import log_sigmoid
  from jax.nn import log_softmax
  from jax.nn import logsumexp
  from jax.nn import one_hot
  from jax.nn import relu
  from jax.nn import relu6
  from jax.nn import selu
  from jax.nn import sigmoid
  from jax.nn import silu
  from jax.nn import soft_sign
  from jax.nn import softmax
  from jax.nn import softplus
  from jax.nn import standardize
  from jax.nn import swish
  import jax.numpy
  from jax.numpy import tanh
label_desc: Use image node_id 1 for calling the PReLU obj's underlying member method code with example usage: obj.__call__(inputs) and returns: jnp