MCPcopy Create free account
hub / github.com/FastMAS/KVCOMM / nuclear_norm

Function nuclear_norm

KVCOMM/utils/utils.py:56–58  ·  view source on GitHub ↗
(matrix)

Source from the content-addressed store, hash-verified

54 return pred
55
56def nuclear_norm(matrix):
57 _, S, _ = torch.svd(matrix)
58 return torch.sum(S)
59
60def frobenius_norm(A, S):
61 return torch.norm(A - S, p='fro')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected