MCPcopy
hub / github.com/zju3dv/4K4D / print_shape

Function print_shape

easyvolcap/utils/net_utils.py:30–41  ·  view source on GitHub ↗
(batch: dotdict)

Source from the content-addressed store, hash-verified

28
29
30def print_shape(batch: dotdict):
31 if isinstance(batch, dict):
32 for k, v in batch.items():
33 print(k)
34 print_shape(v)
35 elif isinstance(batch, list):
36 for v in batch:
37 print_shape(v)
38 elif isinstance(batch, torch.Tensor):
39 print(f'{batch.shape}')
40 else:
41 print(batch)
42
43
44type_mapping = {

Callers

nothing calls this directly

Calls 1

printFunction · 0.85

Tested by

no test coverage detected