官术网_书友最值得收藏!

The architecture of the discriminator

The discriminator in our GAN is a feed-forward neural network with five layers, including an input and an output layer, and three dense layers. The discriminator network is a classifier and is slightly different from the generator network. It processes an image and outputs a probability of the image belonging to a particular class.

The following diagram shows the flow of tensors and the input and output shapes of the tensors for each layer in the discriminator network:

The architecture of the discriminator network

Let's discuss how the discriminator processes data in forward propagation during the training of the network:

  1. Initially, it receives an input of a shape of 28x28. 
  2. The input layer takes the input tensor, which is a tensor with a shape of (batch_sizex28x28), and passes it to the first hidden layer without any modifications.
  3. Next, the flattening layer flattens the tensor to a 784-dimensional vector, which gets passed to the first hidden (dense) layer. The first and second hidden layers modify this to a 500-dimensional vector.
  4. The last layer is the output layer, which is again a dense layer, with one unit (a neuron) and sigmoid as the activation function. It outputs a single value, either a 0 or a 1. A value of 0 indicates that the provided image is fake, while a value of 1 indicates that the provided image is real.
主站蜘蛛池模板: 伊金霍洛旗| 丹凤县| 图木舒克市| 安丘市| 蒙自县| 广东省| 泰宁县| 伊春市| 手游| 凯里市| 双辽市| 龙川县| 舒城县| 惠水县| 克东县| 西乡县| 郴州市| 阳原县| 洞口县| 福海县| 利辛县| 江门市| 耒阳市| 楚雄市| 敦煌市| 乌拉特后旗| 慈溪市| 西充县| 太白县| 昌吉市| 泊头市| 诏安县| 拜泉县| 武强县| 铁力市| 华亭县| 衡南县| 兰西县| 武清区| 沙雅县| 乌鲁木齐市|