src/transformers/models/speech_to_text/modeling_tf_speech_to_text.py/TFSpeech2TextSinusoidalPositionalEmbedding/build
class TFSpeech2TextSinusoidalPositionalEmbedding:    def build(self, input_shape: tf.TensorShape):
        """
        Build shared token embedding layer Shared weights logic adapted from
        https://github.com/tensorflow/models/blob/a009f4fb9d2fc4949e32192a944688925ef78659/official/transformer/v2/embedding_layer.py#L24
        """
        self.embeddings = self.add_weight(
            name="weights",  # name also used in PT
            shape=tf.shape(self.embedding_weights),
            trainable=False,
        )
        self.embeddings.assign(self.embedding_weights)
        super().build(input_shape)