[CNN] Implement the model
Here is the first model I want to try:
- Input: 1D data, length depends on the game variant.
- Output: 1D data, the score for each player.
- Loss: mean squared error.
- Layers:
- Reshape: get the data to the 3D shape, row by row and then page by page (92 * N * number of pages * 1).
- CNN filters: 5 filters of dimensions (15 * 5 * 5), activation ReLU. The second dimension is cyclic. So the outputs are of dimension: 78 * N * (number of pages - 4) * 5.
- Max pooling: Get to the following output dimension: 30 * N * 10 pages * 5 (depth).
- Second CNN filters: 5 filters of dimensions 5 * 3 * 5 (depth 5), ReLU. Output dimension: 26 * (N - 2) * 6 * 5.
- Second max pooling: output 13 * 1 * 3 * 5.
- Reshape: output 195.
- Fully connected: output N.
Let us bound the number of parameters:
- first convolution: max 15 * 5 * 5 * 1 * 5 = 1875 parameters;
- second convolution: max 5 * 5 * 3 * 5 * 5 = 1875;
- fully connected: max 195 * 5 = 875, ReLU.
This merge request defines an API for the model (init the parameters, get the parameters, forward propagation, prediction).
Edited by Vivien Kraus