class_docstr: Just the engineered features from InfinitePositionalEncoding.
class_docstr_tok: ["Just","the","engineered","features","from","InfinitePositionalEncoding","."]
docstr: Initializes the encoding.
  
  Args:
    time_bin_length: TimeBinCausalAttention.bin_length of the first layer.
    mode: if 'predict', allow evaluating one token at a time
docstr_tok: ["Initializes","the","encoding",".","Args",":","time_bin_length",":","TimeBinCausalAttention.bin_length","of","the","first","layer",".","mode",":","if","'predict","'",",","allow","evaluating","one","token","at","a","time"]
code: def __init__(self, time_bin_length, mode="train"):
      """Initializes the encoding.
  
      Args:
        time_bin_length: TimeBinCausalAttention.bin_length of the first layer.
        mode: if 'predict', allow evaluating one token at a time
      """
      super().__init__()
      self._time_bin_length = time_bin_length
      self._mode = mode
  
imports: import logging
  import jax
  import jax.extend
  import numpy
  import trax
  from trax import fastmath
  from trax.fastmath import numpy
  from trax.layers import base
  from trax.layers import initializers
label_desc: Use image node_id 1 to create a new TimeBinPositionalEncoding object from inherited base classes: layer_base with example: obj = TimeBinPositionalEncoding(time_bin_length, mode)