simsiam
SimSIAMLoss
¶
Bases: Module
SimSIAM loss module.
forward(p1, p2, z1, z2)
¶
Compute the SimSIAM loss.
Source code in quadra/losses/ssl/simsiam.py
28 29 30 |
|
simsiam_loss(p1, p2, z1, z2)
¶
SimSIAM loss described in https://arxiv.org/abs/2011.10566.
Parameters:
-
p1
(
Tensor
) –First
predicted
features (i.e. h(f(T(x1)))) -
p2
(
Tensor
) –Second
predicted
features (i.e. h(f(T'(x2)))) -
z1
(
Tensor
) –First 'projected features (i.e. f(T(x1)))
-
z2
(
Tensor
) –Second 'projected features (i.e. f(T(x2)))
Returns:
-
Tensor
–SimSIAM loss
Source code in quadra/losses/ssl/simsiam.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|