IO
Pipeline functions
TensorFlow.train.add_queue_runner
— Function.add_queue_runner(runner::QueueRunner)
Manually adds a queue runner to the graph's collection of queue runners. All runners in the collection will be executed in parallel when start_queue_runners
is invoked.
TensorFlow.train.start_queue_runners
— Function.start_queue_runners(session::Session)
Run all queue runners in parallel that were previously added to the graph's collection of queue runners via add_queue_runner
.
Args:
session
: The TensorFlow session containing the queues
TensorFlow.train.range_input_producer
— Function.range_input_producer(limit; num_epochs=nothing, do_shuffle=true, seed=0, capacity=32)
Produces the integers from 1 to limit
in a queue.
Args:
limit
: Inclusive upper bound on the endpoint of the range of integers to producenum_epochs
: Number of times to produce the integers.do_shuffle
: Iftrue
, shuffle the inputs each epoch.seed
: Seed to use for the RNG ifdo_shuffle
istrue
.capacity
: Sets the queue capacity. Default is 32.
TensorFlow.train.input_producer
— Function.input_producer(input; element_shape=nothing, num_epochs=nothing, do_shuffle=true, seed=0, capacity=32)
Outputs the rows of input
to a queue for input pipelining.
Args:
input
: ATensor
with the rows to produce.element_shape
: The shape of the input rows, in case it can't be inferred. Defaults tonothing
.num_epochs
: Number of times to produce each row. If unspecified (default),input_producer
can produce each row an unlimited number of times.do_shuffle
: Iftrue
, shuffle the inputs each epoch.seed
: Seed to use for the RNG ifdo_shuffle
istrue
.capacity
: Sets the queue capacity. Default is 32.
TensorFlow.train.string_input_producer
— Function.string_input_producer(string_tensors; num_epochs=nothing, do_shuffle=true, seed=0, capacity=32)
Output strings to a queue for an input pipeline.
Args:
string_tensor
: A one dimensionalTensor
of strings to produce.num_epochs
: Number of times to produce the strings.do_shuffle
: Iftrue
, shuffle the inputs each epoch.seed
: Seed to use for the RNG ifdo_shuffle
istrue
.capacity
: Sets the queue capacity. Default is 32.
TensorFlow.train.shuffle_batch
— Function.shuffle_batch(tensors, batch_size; capacity=32, enqueue_many=false, shapes=nothing, dynamic_pad=false, allow_smaller_final_batch=false)
Create batches by randomly shuffling tensors
.
Args:
tensors
: A list of tensors to enqueue.batch_size
: The batch size which will be pulled from the queue.capacity
: Sets the queue capacity. Default is 32.dynamic_pad
: Iftrue
alltensors
will be padded on unknown dimensions tobatch_size
. Otherwisetensors
shapes must be fully known. Currently onlyfalse
is supported.enqueue_many
: Iffalse
,tensors
represents a single example. Otherwisetensors
represents a batch of examples. Currently onlyfalse
is supported.shapes
: The shapes for each example. Defaults to the inferred shapes fromtensors
.allow_smaller_final_batch
: Iftrue
(defaultfalse
), the final batch is allowed to be smaller than the other batches if there are not enough samples remaining.
TensorFlow.train.QueueRunner
— Type.QueueRunner
Represents an object that continually enqueues elements to a TensorFlow queue in parallel with other operations.
TensorFlow.train.create_threads
— Function.create_threads(runner::QueueRunner, session::Session)
Creates tasks that run the enqueue operations in runner
in parallel.
Readers
io.WholeFileReader
io.TextLineReader
read