Looking into the model-building code

In model.py, the Keras imports are as follows:

from keras.models import Sequential, load_model, Modelfrom keras.layers import Input, Dense, Conv2D, Flatten, BatchNormalization, Activation, LeakyReLU, addfrom keras.optimizers import SGDfrom keras import regularizers

The four key model-building methods are:

def residual_layer(self, input_block, filters, kernel_size)def conv_layer(self, x, filters, kernel_size)def value_head(self, x)def policy_head(self, x)

They all have one or more Conv2d layers followed by BatchNormalization and LeakyReLU activation, as shown in Figure 10.1, but value_head and policy_head also have fully-connected layers, as shown in Figure 10.2, after the convolutional layers to generate ...

Get Intelligent Mobile Projects with TensorFlow now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.