MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / unroll_input

Function unroll_input

monai/networks/trt_compiler.py:241–252  ·  view source on GitHub ↗
(input_names, input_example)

Source from the content-addressed store, hash-verified

239
240
241def unroll_input(input_names, input_example):
242 # Simulate list/tuple unrolling during ONNX export
243 unrolled_input = {}
244 for name in input_names:
245 val = input_example[name]
246 if val is not None:
247 if isinstance(val, list) or isinstance(val, tuple):
248 for i in range(len(val)):
249 unrolled_input[f"{name}_{i}"] = make_tensor(val[i])
250 else:
251 unrolled_input[name] = make_tensor(val)
252 return unrolled_input
253
254
255def parse_groups(

Callers 2

forwardMethod · 0.85
_build_and_saveMethod · 0.85

Calls 1

make_tensorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…