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

Function get_batch_dali_sparse

dali/test/python/test_dali_tf_plugin_run.py:122–135  ·  view source on GitHub ↗
(batch_size, pipe_type, label_type)

Source from the content-addressed store, hash-verified

120
121
122def get_batch_dali_sparse(batch_size, pipe_type, label_type):
123 pipe = pipe_type(batch_size=batch_size, num_threads=2, device_id=None, num_gpus=1)
124
125 daliop = dali_tf.DALIIterator()
126 with tf.device("/cpu"):
127 image, label = daliop(
128 pipeline=pipe,
129 shapes=[(batch_size, 3, 227, 227), ()],
130 dtypes=[tf.int32, label_type],
131 device_id=None,
132 sparse=[False, True],
133 )
134
135 return image, label
136
137
138def test_dali_tf_op_sparse(pipe_type=CaffeReadPipeline, batch_size=16, iterations=32):

Callers 1

test_dali_tf_op_sparseFunction · 0.85

Calls 1

deviceMethod · 0.45

Tested by

no test coverage detected