Learn R Programming

⚠️There's a newer version (2.17.0) of this package.Take me there.

R interface to TensorFlow Dataset API

The TensorFlow Dataset API provides various facilities for creating scalable input pipelines for TensorFlow models, including:

  • Reading data from a variety of formats including CSV files and TFRecords files (the standard binary format for TensorFlow training data).

  • Transforming datasets in a variety of ways including mapping arbitrary functions against them.

  • Shuffling, batching, and repeating datasets over a number of epochs.

  • Streaming interface to data for reading arbitrarily large datasets.

  • Reading and transforming data are TensorFlow graph operations, so are executed in C++ and in parallel with model training.

The R interface to TensorFlow datasets provides access to the Dataset API, including high-level convenience functions for easy integration with the tfestimators package.

For documentation on using tfdatasets, see the package website at https://tensorflow.rstudio.com/tools/tfdatasets/.

Copy Link

Version

Install

install.packages('tfdatasets')

Monthly Downloads

3,114

Version

1.9

License

Apache License 2.0

Issues

Pull Requests

Stars

Forks

Maintainer

JJ Allaire

Last Published

August 25th, 2018

Functions in tfdatasets (1.9)

iterator_make_initializer

Create an operation that can be run to initialize this iterator
sql_record_spec

A dataset consisting of the results from a SQL query
output_types

Output types and shapes
dataset_interleave

Maps map_func across this dataset, and interleaves the results
dataset_cache

Caches the elements in this dataset.
dataset_map

Map a function across a dataset.
dataset_decode_delim

Transform a dataset with delimted text lines into a dataset with named columns
dataset_concatenate

Creates a dataset by concatenating given dataset with this dataset.
iterator_string_handle

String-valued tensor that represents this iterator
dataset_shuffle

Randomly shuffles the elements of this dataset.
dataset_filter

Filter a dataset by a predicate
dataset_shuffle_and_repeat

Shuffles and repeats a dataset returning a new permutation for each epoch.
reexports

Objects exported from other packages
as_tf_dataset

Add the tf_dataset class to a dataset
dataset_prepare

Prepare a dataset for analysis
make-iterator

Creates an iterator for enumerating the elements of this dataset.
fixed_length_record_dataset

A dataset of fixed-length records from one or more binary files.
sample_from_datasets

Samples elements at random from the datasets in datasets.
make_csv_dataset

Reads CSV files into a batched dataset
dataset_flat_map

Maps map_func across this dataset and flattens the result.
range_dataset

Creates a dataset of a step-separated range of values.
sparse_tensor_slices_dataset

Splits each rank-N tf$SparseTensor in this dataset row-wise.
dataset_map_and_batch

Fused implementation of dataset_map() and dataset_batch()
read_files

Read a dataset from a set of files
with_dataset

Execute code that traverses a dataset
dataset_batch

Combines consecutive elements of this dataset into batches.
dataset_padded_batch

Combines consecutive elements of this dataset into padded batches
dataset_repeat

Repeats a dataset count times.
dataset_skip

Creates a dataset that skips count elements from this dataset
dataset_take

Creates a dataset with at most count elements from this dataset
dataset_shard

Creates a dataset that includes only 1 / num_shards of this dataset.
file_list_dataset

A dataset of all files matching a pattern
next_batch

Tensor(s) for retreiving the next batch from a dataset
%>%

Pipe operator
input_fn.tf_dataset

Construct a tfestimators input function from a dataset
zip_datasets

Creates a dataset by zipping together the given datasets.
dataset_prefetch

Creates a Dataset that prefetches elements from this dataset.
delim_record_spec

Specification for reading a record from a text file with delimited values
tensors_dataset

Creates a dataset with a single element, comprising the given tensors.
iterator_get_next

Get next element from iterator
tensor_slices_dataset

Creates a dataset whose elements are slices of the given tensors.
iterator_initializer

An operation that should be run to initialize this iterator.
text_line_dataset

A dataset comprising lines from one or more text files.
until_out_of_range

Execute code that traverses a dataset until an out of range condition occurs
tfrecord_dataset

A dataset comprising records from one or more TFRecord files.
dataset_prefetch_to_device

A transformation that prefetches dataset values to the given device