Book Image

Deep Learning with R Cookbook

By : Swarna Gupta, Rehan Ali Ansari, Dipayan Sarkar
Book Image

Deep Learning with R Cookbook

By: Swarna Gupta, Rehan Ali Ansari, Dipayan Sarkar

Overview of this book

Deep learning (DL) has evolved in recent years with developments such as generative adversarial networks (GANs), variational autoencoders (VAEs), and deep reinforcement learning. This book will get you up and running with R 3.5.x to help you implement DL techniques. The book starts with the various DL techniques that you can implement in your apps. A unique set of recipes will help you solve binomial and multinomial classification problems, and perform regression and hyperparameter optimization. To help you gain hands-on experience of concepts, the book features recipes for implementing convolutional neural networks (CNNs), recurrent neural networks (RNNs), and Long short-term memory (LSTMs) networks, as well as sequence-to-sequence models and reinforcement learning. You’ll then learn about high-performance computation using GPUs, along with learning about parallel computation capabilities in R. Later, you’ll explore libraries, such as MXNet, that are designed for GPU computing and state-of-the-art DL. Finally, you’ll discover how to solve different problems in NLP, object detection, and action identification, before understanding how to use pre-trained models in DL apps. By the end of this book, you’ll have comprehensive knowledge of DL and DL packages, and be able to develop effective solutions for different DL problems.
Table of Contents (11 chapters)

Generating images with GANs

Generative adversarial networks (GANs) are widely used for learning any data distribution and imitating it. GANs consist of two networks; one is the generator, which generates new synthetic instances of data from a normal or uniform distribution, while the other is the discriminator, which evaluates the generated instances and checks if they are authentic – that is, they belong to the original training data distribution or not. The generator and discriminator are pitted against each other in a counterfeiter and cop scenario where the goal of the counterfeiter is to fool the cop by generating false data and the cop's role is to detect the lies. The feedback from the discriminator is passed on to the generator so that it can improvise at each iteration. Note that although both networks optimize a different and opposite objective...