NetPairEmbeddingOperator

NetPairEmbeddingOperator[net]

represents a net that takes a pair of tensors, embeds them into a vector space using net, and outputs the distance under the embedding.

NetPairEmbeddingOperator[net,"DistanceFunction"f]

specifies a distance function to use.

Details and Options

Examples

open allclose all

Basic Examples  (2)

Create a NetPairEmbeddingOperator that embeds inputs using a NetChain:

In[1]:=
Click for copyable input
Out[1]=

Create a NetPairEmbeddingOperator that embeds a pair of length-2 vectors using a randomly initialized NetChain:

In[1]:=
Click for copyable input
Out[1]=

Apply the net to a pair of input vectors:

In[2]:=
Click for copyable input
Out[2]=

Thread the layer across a batch of input vectors:

In[3]:=
Click for copyable input
Out[3]=

Scope  (1)

Options  (1)

Applications  (2)

Properties & Relations  (1)

Possible Issues  (1)

See Also

ContrastiveLossLayer  NetMapOperator  NetNestOperator  NetFoldOperator  NetChain  NetGraph  NetExtract

Introduced in 2017
(11.1)