hyperspherical
align_loss(x, y, alpha=2)
¶
Mean(l2^alpha).
Parameters:
Returns:
-
Tensor
–Align loss
Source code in quadra/losses/ssl/hyperspherical.py
20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
cosine_align_loss(x, y)
¶
Computes mean of cosine distance based on similarity mean(1 - cosine_similarity).
Parameters:
Returns:
-
Tensor
–cosine align loss
Source code in quadra/losses/ssl/hyperspherical.py
5 6 7 8 9 10 11 12 13 14 15 16 |
|
uniform_loss(x, t=2.0)
¶
log(mean(exp(-t*dist_p2))).
Parameters:
Returns:
-
Tensor
–Uniform loss
Source code in quadra/losses/ssl/hyperspherical.py
35 36 37 38 39 40 41 42 43 44 45 |
|