src/transformers/models/gpt2/modeling_tf_gpt2.py/TFGPT2MainLayer/build
class TFGPT2MainLayer:    def build(self, input_shape):
        with tf.name_scope("wpe"):
            self.wpe = self.add_weight(
                name="embeddings",
                shape=[self.n_positions, self.n_embd],
                initializer=get_initializer(self.initializer_range),
            )

        super().build(input_shape)