src/transformers/models/groupvit/modeling_tf_groupvit.py/TFGroupViTVisionEmbeddings/build
class TFGroupViTVisionEmbeddings:    def build(self, input_shape: tf.TensorShape):
        num_patches = self.patch_embeddings.num_patches
        self.position_embeddings = self.add_weight(
            shape=(1, num_patches, self.config.hidden_size),
            initializer="zeros",
            trainable=True,
            name="position_embeddings",
        )

        super().build(input_shape)