Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 546 Bytes

MetricEmbedding.md

File metadata and controls

31 lines (20 loc) · 546 Bytes

TFSimilarity.layers.MetricEmbedding

L2 Normalized Dense layer.

TFSimilarity.layers.MetricEmbedding(
    units,
    activation=None,
    use_bias=True,
    kernel_initializer=glorot_uniform,
    bias_initializer=zeros,
    kernel_regularizer=None,
    bias_regularizer=None,
    activity_regularizer=None,
    kernel_constraint=None,
    bias_constraint=None,
    **kwargs
)

This layer is usually used as output layer, especially when using cosine distance as the similarity metric.