class_docstr: Basic MLP class with hidden layers and an output layers.
class_docstr_tok: ["Basic","MLP","class","with","hidden","layers","and","an","output","layers","."]
code: def __call__(self, x):
      inputs = x
      for i in range(self.depth):
          layer = nn.Dense(
              self.width,
              use_bias=self.use_bias,
              kernel_init=self.hidden_init,
              name=f"hidden_{i}",
          )
          if i in self.skips:
              x = jnp.concatenate([x, inputs], axis=-1)
          x = layer(x)
          x = self.hidden_activation(x)
  
      if self.output_channels > 0:
          logit_layer = nn.Dense(
              self.output_channels,
              use_bias=self.use_bias,
              kernel_init=self.output_init,
              name="logit",
          )
          x = logit_layer(x)
          if self.output_activation is not None:
              x = self.output_activation(x)
  
      return x
  
imports: import functools
  from typing import Optional, Tuple
  from flax import linen
  import jax
  import jax.numpy
  from nerfies import types
label_desc: Use image node_id 1 for calling the MLP obj's underlying member method code with example usage: obj.__call__(x) and returns: x