This is an excerpt from Manning's book Deep Learning with R. Login to get full access to this book.
Listing 3.1. Loading the IMDB dataset library(keras) imdb <- dataset_imdb(num_words = 10000) c(c(train_data, train_labels), c(test_data, test_labels)) %<-% imdb
Figure 6.9. Training and validation metrics on IMDB with layer_simple_rnn