MCPcopy
hub / github.com/TencentARC/Pixal3D / is_valid_sparse_tensor

Function is_valid_sparse_tensor

data_toolkit/encode_shape_latent_view.py:23–24  ·  view source on GitHub ↗
(tensor)

Source from the content-addressed store, hash-verified

21
22
23def is_valid_sparse_tensor(tensor):
24 return torch.isfinite(tensor.feats).all() and torch.isfinite(tensor.coords).all()
25
26def clear_cuda_error():
27 torch.cuda.synchronize()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected