R/zip_datasets.R

Defines functions zip_datasets

Documented in zip_datasets

#' Creates a dataset by zipping together the given datasets.
#'
#' Merges datasets together into pairs or tuples that contain an element from
#' each dataset.
#'
#' @param ... Datasets to zip (or a single argument with a list or list of lists of datasets).
#'
#' @return A dataset
#'
#' @export
zip_datasets <- function(...) {
  validate_tf_version()
  as_tf_dataset(
    tf$data$Dataset$zip(tuple(...))
  )
}

Try the tfdatasets package in your browser

Any scripts or data that you put into this service are public.

tfdatasets documentation built on Nov. 10, 2021, 1:07 a.m.