MCPcopy Create free account
hub / github.com/NVIDIA/DALI / expand_arg_input

Function expand_arg_input

dali/test/python/sequences_test_utils.py:254–264  ·  view source on GitHub ↗

Expands the `arg_data` to match the sequence shape of input_data.

(input_data: ArgData, arg_data: ArgData)

Source from the content-addressed store, hash-verified

252
253
254def expand_arg_input(input_data: ArgData, arg_data: ArgData):
255 """
256 Expands the `arg_data` to match the sequence shape of input_data.
257 """
258 assert arg_data.desc.expandable_prefix in ["F", ""]
259 assert len(input_data.data) == len(arg_data.data)
260 arg_has_frames = arg_data.desc.expandable_prefix == "F"
261 return [
262 expand_arg(input_data.desc.expandable_prefix, arg_has_frames, input_batch, arg_batch)
263 for input_batch, arg_batch in zip(input_data.data, arg_data.data)
264 ]
265
266
267def _test_seq_input(num_iters, operator_fn, fixed_params, input_params, input_data: ArgData, rng):

Callers 1

expand_paramsMethod · 0.85

Calls 1

expand_argFunction · 0.85

Tested by

no test coverage detected