5.3. CNN_models.py

class CNN_models.Models(input_shape=(128, 128, 3), n_classes=None)

Bases: object

The definition of all TensorFlow convolutional Neural Networks used in this project.

getModel(model_name)

Given the model name, this returns a function that instantiates the desired model.

Parameters

model_name (str) – name of the desired model

Returns

the model

Return type

function

model4()

This is the simplest model in our series of models. The total number of weight number of this model is ~1.600,000. It has two sets of double convolutional layers.

Returns

a TensorFlow model

Return type

tf.keras.models

model5()

This model is the most complex model in our study. It has ~2,500,000 free parameters and three sets of double convolutional layers.

Returns

a TensorFlow model

Return type

tf.keras.models

model6()

This model is comparable to model4 in terms of complexity, although the number of convolutional units is larger in this model.

Returns

a TensorFlow model

Return type

tf.keras.models