Returns cosine similarity between x1 and x2, computed along dim.
Arguments
- x1
(Tensor) First input.
- x2
(Tensor) Second input (of size matching x1).
- dim
(int, optional) Dimension of vectors. Default: 2
- eps
(float, optional) Small value to avoid division by zero.
Default: 1e-8