class_docstr: A vectorized sinusoidal encoding.
  
  Attributes:
    num_freqs: the number of frequency bands in the encoding.
    min_freq_log2: the log (base 2) of the lower frequency.
    max_freq_log2: the log (base 2) of the upper frequency.
    scale: a scaling factor for the positional encoding.
    use_identity: if True use the identity encoding as well.
class_docstr_tok: ["A","vectorized","sinusoidal","encoding",".","Attributes",":","num_freqs",":","the","number","of","frequency","bands","in","the","encoding",".","min_freq_log2",":","the","log","(","base","2",")","of","the","lower","frequency",".","max_freq_log2",":","the","log","(","base","2",")","of","the","upper","frequency",".","scale",":","a","scaling","factor","for","the","positional","encoding",".","use_identity",":","if","True","use","the","identity","encoding","as","well","."]
code: def setup(self):
      if self.max_freq_log2 is None:
          max_freq_log2 = self.num_freqs - 1.0
      else:
          max_freq_log2 = self.max_freq_log2
      self.freq_bands = 2.0 ** jnp.linspace(
          self.min_freq_log2, max_freq_log2, int(self.num_freqs)
      )
  
      # (F, 1).
      self.freqs = jnp.reshape(self.freq_bands, (self.num_freqs, 1))
  
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 SinusoidalEncoder obj's underlying member method code with example usage: obj.setup() without return types