Table of Contents

Enum MatchingNetworksAttentionFunction

Namespace
AiDotNet.MetaLearning.Options
Assembly
AiDotNet.dll

Attention function types for Matching Networks.

public enum MatchingNetworksAttentionFunction

Fields

Cosine = 0

Cosine similarity between embeddings.

Measures the angle between vectors, ignoring magnitude.

DotProduct = 1

Dot product similarity.

Simple inner product, considers both angle and magnitude.

Euclidean = 2

Negative Euclidean distance.

Uses negative distance so higher values indicate more similarity.

Learned = 3

Learned similarity function.

Uses a learned network to compute similarity.

Remarks

The attention function determines how similarity is measured between query and support embeddings when computing attention weights.

For Beginners: This controls how the network decides which support examples are most similar to the query example.