class_docstr: Relative positional encodings.
class_docstr_tok: ["Relative","positional","encodings","."]
code: def _create_positional_embedding(
      self, start, end, step, batch_size, clamp_len=None
  ):
      pos_seq = tf.range(start, end, step)
      if clamp_len is not None:
          pos_seq = tf.clip_by_value(pos_seq, -clamp_len, clamp_len)
      pos_emb = self.sinusoid_embed(pos_seq)
      pos_emb = pos_emb[:, None, :]
  
      if batch_size is not None:
          pos_emb = tf.tile(pos_emb, [1, batch_size, 1])
  
      return pos_emb
  
imports: import tensorflow
  from texar.tf.core import layers
  from texar.tf.module_base import ModuleBase
  from texar.tf.utils.mode import is_train_mode
label_desc: Use image node_id 3 for calling the RelativePositionalEncoding obj's underlying member method code with example usage: obj._create_positional_embedding(start, end, step, batch_size, clamp_len) and returns: pos_emb