Welcome to our Support Center

CDist

Description

CDist is an operator that quickly computes pairwise distances between two sets of vectors. It takes two matrices (A and B) as input and returns a distance matrix according to the specified metric.

 

Input parameters

 

specified_outputs_namearray, this parameter lets you manually assign custom names to the output tensors of a node.

 Graphs in : cluster, ONNX model architecture.

A (heterogeneous) – T : object, 2D matrix with shape (M,N).
B (heterogeneous) – T : object, 2D matrix with shape (K,N).

 Parameters : cluster,

metric : enum, the distance metric to use.
Default value “None”.
 training? : boolean, whether the layer is in training mode (can store data for backward).
Default value “True”.
 lda coeff : float, defines the coefficient by which the loss derivative will be multiplied before being sent to the previous layer (since during the backward run we go backwards).
Default value “1”.

 name (optional) : string, name of the node.

Output parameters

 

 C (heterogeneous) – T : object, a 2D Matrix that represents the distance between each pair of the two collections of inputs.

Type Constraints

T in (tensor(float)tensor(double)) : Constrains input to only numeric types.

Example

All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install Deep Learning library to run it).
Table of Contents