After differentiating the real and fake images, we will now merge them using the following steps:
- In our next step, we create an array with all the 0 values in the shape of our real images stacked on top of our fake images. That is to say, the first dimension is equal to twice the batch size, which in this case is 40, and the remaining three dimensions are equal to the size of our image arrays. We create this placeholder array of zeroes by running the following code:
combined_images <- array(0, dim = c(nrow(real_images) * 2, 50,50,3))
- After running this code, we will see a new object in our Environment window and we can see that it does have a first dimension that is twice the size of the other two arrays ...