Now, we create target labels for all the images using the following steps:
- We need to create a matrix of labels; this is simply a matrix of binary values. We add 20 rows with values of 1 to label the fake images and 20 rows with values of 0 to label the real images. We create our matrix of label data using the following code:
labels <- rbind(matrix(1, nrow = 20, ncol = 1), matrix(0, nrow = 20, ncol = 1))
- After running this code, let's click on the labels object to view it. We can see that it does contain 20 rows with a value of 1 and 20 rows with a value of 0. The following is an image that you will see near the midpoint when viewing this matrix:
- The next step is to add some noise to the labels. Just like using ...