MCPcopy Create free account
hub / github.com/CDTrans/CDTrans / compute_cosine_distance

Function compute_cosine_distance

utils/metrics.py:39–52  ·  view source on GitHub ↗

Computes cosine distance. Args: features (torch.Tensor): 2-D feature matrix. others (torch.Tensor): 2-D feature matrix. Returns: torch.Tensor: distance matrix.

(qf, gf)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected