rstudio / tfdatasets

R interface to TensorFlow Datasets API
https://tensorflow.rstudio.com/tools/tfdatasets/
34 stars 12 forks source link

Feature/as function #37

Closed dfalbel closed 5 years ago

dfalbel commented 5 years ago

This PR allows us to use purrr style lambda functions with dataset_map:

library(tfdatasets)
dataset <- range_dataset(1, 100) %>%
    dataset_map_and_batch(batch_size = 32, drop_remainder = TRUE, ~ -.x) %>%
    dataset_prefetch(1)
javierluraschi commented 5 years ago

I would create/update a NEWS file to help track new improvements.