|
Safemotion Lib
|
Functions | |
| concat_all_gather (tensor) | |
| normalize (x, axis=-1) | |
| euclidean_dist (x, y) | |
| cosine_dist (x, y) | |
@author: xingyu liao @contact: sherlockliao01@gmail.com
| fastreid.modeling.losses.utils.concat_all_gather | ( | tensor | ) |
Performs all_gather operation on the provided tensors. *** Warning ***: torch.distributed.all_gather has no gradient.
Definition at line 10 of file utils.py.
| fastreid.modeling.losses.utils.cosine_dist | ( | x, | |
| y ) |
Definition at line 43 of file utils.py.
| fastreid.modeling.losses.utils.euclidean_dist | ( | x, | |
| y ) |
Definition at line 34 of file utils.py.
| fastreid.modeling.losses.utils.normalize | ( | x, | |
| axis = -1 ) |
Normalizing to unit length along the specified dimension. Args: x: pytorch Variable Returns: x: pytorch Variable, same shape as input
Definition at line 23 of file utils.py.