In this section, we will out training of the network. While training the network, we will save fake images and store loss values to review the training progress. They will help us assess the effectiveness of the network when creating realistic fake images.
Training the network
Initial setup for saving fake images and loss values
We will start by specifying a few things that we will need for the training process. Let's take a look at the following code:
# Initial settings
b <- 50
setwd("~/Desktop/")
dir <- "FakeImages"
dir.create(dir)
start <- 1; dloss <- NULL; gloss <- NULL
From the preceding code, we can observe the following:
- We will use a batch size (b) of 50.
- We will save fake images...