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

Function arg_for_sample

dali/test/python/sequences_test_utils.py:331–340  ·  view source on GitHub ↗
(sample_idx, batch_idx, sample)

Source from the content-addressed store, hash-verified

329 assert frame_idx >= 0
330
331 def arg_for_sample(sample_idx, batch_idx, sample):
332 if check_broadcasting and rng.randint(1, 4) == 1:
333 return np.array([param_cb(SampleDesc(rng, 0, sample_idx, batch_idx, sample))])
334 num_frames = sample.shape[frame_idx]
335 return np.array(
336 [
337 param_cb(SampleDesc(rng, frame_idx, sample_idx, batch_idx, sample))
338 for frame_idx in range(num_frames)
339 ]
340 )
341
342 return [
343 [arg_for_sample(sample_idx, batch_idx, sample) for sample_idx, sample in enumerate(batch)]

Callers 1

get_input_arg_per_frameFunction · 0.85

Calls 1

SampleDescClass · 0.70

Tested by

no test coverage detected