class_docstr: Creates a positional embedding.
  
  This layer creates a positional embedding as described in "BERT: Pre-training
  of Deep Bidirectional Transformers for Language Understanding"
  (https://arxiv.org/abs/1810.04805).
  
  This layer can be set up to either create a statically shaped slice or a
  dynamically shaped slice. If `use_dynamic_slicing` is True, the input tensor
  can have a dynamic 1st dimension, while if `use_dynamic_slicing` is False the
  input size must be fixed.
  
  Attributes:
    use_dynamic_slicing: Whether to use the dynamic slicing path.
    max_sequence_length: The maximum size of the dynamic sequence. Only
      applicable if `use_dynamic_slicing` is True.
    initializer: The initializer to use for the embedding weights. Defaults to
      "glorot_uniform".
code: def get_config(self):
      config = {
          "max_sequence_length": self._max_sequence_length,
          "initializer": tf.keras.initializers.serialize(
              self._initializer
          ),
          "use_dynamic_slicing": self._use_dynamic_slicing,
      }
      base_config = super(PositionEmbedding, self).get_config()
      return dict(list(base_config.items()) + list(config.items()))
  
file_path: autodist/examples/benchmark/utils/modeling/layers/position_embedding.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from utils import tf_utils
label_desc: Use image node_id 2 for calling the PositionEmbedding obj's underlying member method code with example usage: obj.get_config() and returns: dict