def build_model(n_stimuli, n_dim, n_group):
    'Build model.\n\n    Arguments:\n        n_stimuli: Integer indicating the number of stimuli in the\n            embedding.\n        n_dim: Integer indicating the dimensionality of the embedding.\n\n    Returns:\n        model: A TensorFlow Keras model.\n\n    '
    stimuli = tf.keras.layers.Embedding((n_stimuli + 1), n_dim, mask_zero=True)
    shared_similarity = psiz.keras.layers.ExponentialSimilarity(trainable=False, beta_initializer=tf.keras.initializers.Constant(10.0), tau_initializer=tf.keras.initializers.Constant(1.0), gamma_initializer=tf.keras.initializers.Constant(0.0))
    kernel_0 = build_kernel(shared_similarity, n_dim)
    kernel_1 = build_kernel(shared_similarity, n_dim)
    kernel_2 = build_kernel(shared_similarity, n_dim)
    kernel_group = psiz.keras.layers.GateMulti(subnets=[kernel_0, kernel_1, kernel_2], group_col=0)
    model = psiz.keras.models.Rank(stimuli=stimuli, kernel=kernel_group, use_group_kernel=True)
    return model
Build model.

Arguments:
    n_stimuli: Integer indicating the number of stimuli in the
        embedding.
    n_dim: Integer indicating the dimensionality of the embedding.

Returns:
    model: A TensorFlow Keras model.
def build_model(n_stimuli, n_dim, n_group):
    'Build model.\n\n    Arguments:\n        n_stimuli: Integer indicating the number of stimuli in the\n            embedding.\n        n_dim: Integer indicating the dimensionality of the embedding.\n\n    Returns:\n        model: A TensorFlow Keras model.\n\n    '
    stimuli = tf.keras.layers.Embedding((n_stimuli + 1), n_dim, mask_zero=True)
    shared_similarity = psiz.keras.layers.ExponentialSimilarity(trainable=False, beta_initializer=tf.keras.initializers.Constant(10.0), tau_initializer=tf.keras.initializers.Constant(1.0), gamma_initializer=tf.keras.initializers.Constant(0.0))
    kernel_0 = build_kernel(shared_similarity, n_dim)
    kernel_1 = build_kernel(shared_similarity, n_dim)
    kernel_2 = build_kernel(shared_similarity, n_dim)
    kernel_group = psiz.keras.layers.GateMulti(subnets=[kernel_0, kernel_1, kernel_2], group_col=0)
    model = psiz.keras.models.Rank(stimuli=stimuli, kernel=kernel_group, use_group_kernel=True)
    return model