dataset_batch: Combines consecutive elements of this dataset into batches.

Description Usage Arguments Value See Also

View source: R/dataset_methods.R

Description

Combines consecutive elements of this dataset into batches.

Usage

1
dataset_batch(dataset, batch_size, drop_remainder = FALSE)

Arguments

dataset

A dataset

batch_size

An integer, representing the number of consecutive elements of this dataset to combine in a single batch.

drop_remainder

Ensure that batches have a fixed size by omitting any final smaller batch if it's present. Note that this is required for use with the Keras tensor inputs to fit/evaluate/etc.

Value

A dataset

See Also

Other dataset methods: dataset_cache(), dataset_collect(), dataset_concatenate(), dataset_decode_delim(), dataset_filter(), dataset_interleave(), dataset_map_and_batch(), dataset_map(), dataset_padded_batch(), dataset_prefetch_to_device(), dataset_prefetch(), dataset_reduce(), dataset_repeat(), dataset_shuffle_and_repeat(), dataset_shuffle(), dataset_skip(), dataset_take(), dataset_window()


tfdatasets documentation built on Sept. 7, 2021, 5:08 p.m.