class_docstr: FFN block for predicting bounding box coordinates.
class_docstr_tok: ["FFN","block","for","predicting","bounding","box","coordinates","."]
docstr: Applies FFN MLP block to inputs.
  
  Args:
    x: Input tensor.
  
  Returns:
    Output of FFN MLP block.
code: def __call__(self, x: jnp.ndarray) -> jnp.ndarray:
      """Applies FFN MLP block to inputs.
  
      Args:
        x: Input tensor.
  
      Returns:
        Output of FFN MLP block.
      """
      for _ in range(self.num_layers - 1):
          # This is like pytorch initializes biases in linear layers.
          bias_range = 1 / np.sqrt(x.shape[-1])
          x = nn.Dense(
              self.mlp_dim,
              kernel_init=pytorch_kernel_init(dtype=self.dtype),
              bias_init=uniform_initializer(
                  -bias_range, bias_range, dtype=self.dtype
              ),
              dtype=self.dtype,
          )(x)
          x = nn.relu(x)
  
      bias_range = 1 / np.sqrt(x.shape[-1])
      x = nn.Dense(
          4,
          kernel_init=pytorch_kernel_init(dtype=self.dtype),
          bias_init=uniform_initializer(
              -bias_range, bias_range, dtype=self.dtype
          ),
      )(x)
      output = nn.sigmoid(x)
      return output
  
imports: import functools
  from typing import Any, Callable, Dict, Tuple, Optional
  import flax.linen
  import jax
  from jax.nn import initializers
  import jax.numpy
  import ml_collections
  import numpy
  from scenic.model_lib.layers import attention_layers
  from scenic.projects.baselines import resnet
  from scenic.projects.baselines.detr import detr_base_model
label_desc: Use image node_id 1 for calling the BBoxCoordPredictor obj's underlying member method code with example usage: obj.__call__(x) and returns: output