I cannot find any examples for HingeEmbeddingLoss. I’m confused about the usage of this criterion,

what’s the input should I give it? As the doc says, HingeEmbeddingLoss Measures the loss given an input x which is a 2D mini-batch tensor and a labels y, a 1D tensor containg values (1 or -1). Is there any examples for the input x?
2)can I set the distance calculation method in the constructor, e.g. L2 pairwise distance?