Discriminator

The discriminator in this architecture is fairly straightforward, but we'll take a few steps to explain how to construct it at a high-level:

  1. Define a model to keep our discriminator in the class:
define a model:
  1. For this network, we're going to have two input images concatenated together at the beginning—this is where the conditional adversarial portion of the paper comes in—by providing the original image and a fake image. It provides a classification based on this input:
input_A = Input(shape=Shape of Input A)
input_B = Input(shape= Shape of Input B)
input_layer = Concatenate(axis=-1)([input_A, input_B])
  1. Using the convolutional two-dimensional layers, we're learning features at a small scale all of the way up to contextual features by increasing the number of filters at each layer:
conv2d(small)
conv2d(medium)
conv2d(big)
conv2d(bigger)
conv2d(biggest)
  1. The output_layer is classification (a number between 0 to 1 or fake to real):
output_layer = Convolution2D(1)
return Model([input_A, input_B],output_layer)

The model is defined as a two-image input and a single-classification output.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.37.154