TensorFlow Plugin API reference

nvidia.dali.plugin.tf.DALIIterator()

DALI TensorFlow plugin

Creates a Dali pipeline for classification tasks from serialized DALI pipeline (given in serialized_pipeline parameter). Returns 2 TensorFlow tensors with data and label. shape must match the first DALI Pipeline output tensor shape (must be dim 4, either NCHW or NHWC). image_type must match the type of the first DALI Pipeline output tensor. label_type must match the type of the second DALI Pipeline output tensor.

Parameters:
  • serialized_pipeline – A string.
  • shape – A tf.TensorShape or list of ints.
  • num_threads – An optional int. Defaults to -1.
  • device_id – An optional int. Defaults to -1.
  • image_type – An optional tf.DType from: tf.float32, tf.int32, tf.half. Defaults to tf.float32.
  • label_type – An optional tf.DType from: tf.float32, tf.int32, tf.half. Defaults to tf.int32.
  • name – A name for the operation (optional).
Returns:

A tuple of Tensor objects (batch, label).

batch: A Tensor of type image_type. label: A Tensor of type label_type.