class_docstr: Network that predicts warps as a translation field.
  
  References:
    https://en.wikipedia.org/wiki/Vector_potential
    https://en.wikipedia.org/wiki/Helmholtz_decomposition
  
  Attributes:
    points_encoder: the positional encoder for the points.
    metadata_encoder: an encoder for metadata.
    alpha: the alpha for the positional encoding.
    skips: the index of the layers with skip connections.
    depth: the depth of the network excluding the output layer.
    hidden_channels: the width of the network hidden layers.
    activation: the activation for each layer.
    metadata_encoded: whether the metadata parameter is pre-encoded or not.
    hidden_initializer: the initializer for the hidden layers.
    output_initializer: the initializer for the last output layer.
class_docstr_tok: ["Network","that","predicts","warps","as","a","translation","field",".","References",":","https",":","\/\/en.wikipedia.org\/wiki\/Vector_potential","https",":","\/\/en.wikipedia.org\/wiki\/Helmholtz_decomposition","Attributes",":","points_encoder",":","the","positional","encoder","for","the","points",".","metadata_encoder",":","an","encoder","for","metadata",".","alpha",":","the","alpha","for","the","positional","encoding",".","skips",":","the","index","of","the","layers","with","skip","connections",".","depth",":","the","depth","of","the","network","excluding","the","output","layer",".","hidden_channels",":","the","width","of","the","network","hidden","layers",".","activation",":","the","activation","for","each","layer",".","metadata_encoded",":","whether","the","metadata","parameter","is","pre-encoded","or","not",".","hidden_initializer",":","the","initializer","for","the","hidden","layers",".","output_initializer",":","the","initializer","for","the","last","output","layer","."]
code: def warp(
      self,
      points: jnp.ndarray,
      metadata_embed: jnp.ndarray,
      extra: Dict[str, Any],
  ):
      points_embed = self.points_encoder(
          points, alpha=extra.get("alpha")
      )
      inputs = jnp.concatenate([points_embed, metadata_embed], axis=-1)
      translation = self.mlp(inputs)
      warped_points = points + translation
  
      return warped_points
  
imports: from typing import Any, Iterable, Optional, Dict
  from flax import linen
  import jax
  import jax.numpy
  from nerfies import glo
  from nerfies import model_utils
  from nerfies import modules
  from nerfies import rigid_body
  from nerfies import types
label_desc: Use image node_id 3 for calling the TranslationField obj's underlying member method code with example usage: obj.warp(points, metadata_embed, extra) and returns: warped_points