- Generative Adversarial Networks Projects
- Kailash Ahirwar
- 240字
- 2021-07-02 13:38:43
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:
- Initially, it receives an input of a shape of 28x28.
- 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.
- 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.
- 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.
推薦閱讀
- 基于LabWindows/CVI的虛擬儀器設計與應用
- Python Artificial Intelligence Projects for Beginners
- 圖形圖像處理(Photoshop)
- 精通Windows Vista必讀
- Hands-On Cloud Solutions with Azure
- Cloud Analytics with Microsoft Azure
- 離散事件系統建模與仿真
- ServiceNow Cookbook
- Google App Inventor
- 工業機器人現場編程(FANUC)
- 永磁同步電動機變頻調速系統及其控制(第2版)
- 項目管理成功利器Project 2007全程解析
- 氣動系統裝調與PLC控制
- Hands-On Data Warehousing with Azure Data Factory
- 大數據導論