MCPcopy Create free account
hub / github.com/OpenImagingLab/4DSloMo / strip_lowerdiag

Function strip_lowerdiag

utils/general_utils.py:65–74  ·  view source on GitHub ↗
(L)

Source from the content-addressed store, hash-verified

63 return helper
64
65def strip_lowerdiag(L):
66 uncertainty = torch.zeros((L.shape[0], 6), dtype=torch.float, device="cuda")
67
68 uncertainty[:, 0] = L[:, 0, 0]
69 uncertainty[:, 1] = L[:, 0, 1]
70 uncertainty[:, 2] = L[:, 0, 2]
71 uncertainty[:, 3] = L[:, 1, 1]
72 uncertainty[:, 4] = L[:, 1, 2]
73 uncertainty[:, 5] = L[:, 2, 2]
74 return uncertainty
75
76def strip_symmetric(sym):
77 return strip_lowerdiag(sym)

Callers 1

strip_symmetricFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected