(
    text_ds,
    pipeline_func,
    num_parallel_calls,
    batch_size,
)
return iterator
Get pre-process oprators.
Get pre-process oprators.
Get pre - process oprators .
def get_pre_process_text_ds_iter(
    text_ds,
    pipeline_func,
    num_parallel_calls,
    batch_size,
):
  """Get pre-process oprators."""

  text_ds = text_ds.map(pipeline_func, num_parallel_calls=num_parallel_calls)

  text_ds = text_ds.batch(batch_size)

  iterator = tf.data.make_initializable_iterator(text_ds)

  return iterator
def get_pre_process_text_ds_iter ( text_ds , pipeline_func , num_parallel_calls , batch_size , ) : text_ds = text_ds . map ( pipeline_func , num_parallel_calls = num_parallel_calls ) text_ds = text_ds . batch ( batch_size ) iterator = tf . data . make_initializable_iterator ( text_ds ) return iterator