MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / is_nested

Function is_nested

PATH/core/fp16/utils.py:68–69  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

66 return is_tensor_like(x) and is_floating_point(x)
67
68def is_nested(x):
69 return isinstance(x, tuple) or isinstance(x, list)
70
71def should_cache(x):
72 if is_nested(x):

Callers 6

is_fp_tensorFunction · 0.85
should_cacheFunction · 0.85
collect_typesFunction · 0.85
maybe_halfFunction · 0.85
maybe_floatFunction · 0.85
cached_castFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected