O'Reilly logo

R Deep Learning Cookbook by Achyutuni Sri Krishna Rao, Dr. PKS Prakash

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

  1. Start R (using Rstudio or Docker) and load the required packages.
  2. Download the dataset (binary version) from http://www.cs.toronto.edu/~kriz/cifar.html manually or use the following function to download the data in the R environment. The function takes the working directory or the downloaded dataset's location path as an input parameter (data_dir):
# Function to download the binary filedownload.cifar.data <- function(data_dir) {dir.create(data_dir, showWarnings = FALSE)setwd(data_dir)if (!file.exists('cifar-10-binary.tar.gz')){download.file(url='http://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz', destfile='cifar-10-binary.tar.gz', method='wget')untar("cifar-10-binary.tar.gz") # Unzip filesfile.remove("cifar-10-binary.tar.gz") ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required