def METHOD_NAME(self, input_shape):
    """Keras build method."""
    feature_dim = input_shape[-1]
    if not isinstance(feature_dim, int):
        feature_dim = feature_dim.value
    self.fc = tf.keras.layers.Dense(
        units=self.num_clusters,
        activation=tf.nn.softmax,
        kernel_regularizer=tf.keras.regularizers.l2(1e-5),
    )
    self.cluster_centers = self.add_weight(
        name="cluster_centers",
        shape=(1, feature_dim, self.num_clusters),
        initializer=tf.keras.initializers.TruncatedNormal(
            stddev=1.0 / math.sqrt(feature_dim)
        ),
        trainable=True,
    )
    super(NetVLAD, self).METHOD_NAME(input_shape)