February 2020
Intermediate to advanced
328 pages
8h 19m
English
While working with large datasets, we often run out of memory while training a deep learning model. The keras library in R provides various generator utility functions, which generate batches of training data on the fly during the training process. It also provides a utility function for creating batches of temporal data. The following code creates a supervised form of data similar to what we created in the How to do it.. section of this recipe, using a generator utility:
# importing required libraries library(reticulate) library(keras) # generating dummy data data = seq(from = 1,to = 10) # timseries generator gen = timeseries_generator(data = data,targets = data,length = 1,batch_size = 5) # Print first batch iter_next(as_iterator ...
Read now
Unlock full access