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

Function _testimpl_reshape_src_dims_arg

dali/test/python/operator_2/test_reshape.py:334–348  ·  view source on GitHub ↗
(src_dims, rel_shape, shapes, expected_out_shapes)

Source from the content-addressed store, hash-verified

332
333
334def _testimpl_reshape_src_dims_arg(src_dims, rel_shape, shapes, expected_out_shapes):
335 batch_size = len(shapes)
336 pipe = reshape_pipe(
337 batch_size=batch_size,
338 num_threads=1,
339 device_id=0,
340 shapes=shapes,
341 src_dims=src_dims,
342 rel_shape=rel_shape,
343 )
344 for _ in range(3):
345 outs = pipe.run()
346 for i in range(batch_size):
347 out_arr = np.array(outs[0][i])
348 assert out_arr.shape == expected_out_shapes[i]
349
350
351def test_reshape_src_dims_arg():

Callers

nothing calls this directly

Calls 2

reshape_pipeFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected