@staticmethod
def _build_top_model(input_shape, dense_output=(256, 1024), dropout=0.1):
    ' Build Top Model\n\n        Build the fully connected layers of the network.\n\n        Parameters\n        ----------\n        input_shape : tuple\n            Input data shape\n        dense_output : tuple, optional\n            Size of dense output layers, default is (256, 1024)\n        dropout : float, optional\n            Dropout rate, default is 0.1\n\n        Returns\n        -------\n        keras.model\n            Fully connected top model\n\n        '
    model = Sequential()
    model.add(Flatten(input_shape=input_shape))
    model.add(Dense(dense_output[0]))
    model.add(Dropout(dropout))
    model.add(Dense(dense_output[1], activation='relu'))
    model.add(Dense(1, activation='sigmoid'))
    return model
Build Top Model

Build the fully connected layers of the network.

Parameters
----------
input_shape : tuple
    Input data shape
dense_output : tuple, optional
    Size of dense output layers, default is (256, 1024)
dropout : float, optional
    Dropout rate, default is 0.1

Returns
-------
keras.model
    Fully connected top model
@staticmethod
def _build_top_model(input_shape, dense_output=(256, 1024), dropout=0.1):
    ' Build Top Model\n\n        Build the fully connected layers of the network.\n\n        Parameters\n        ----------\n        input_shape : tuple\n            Input data shape\n        dense_output : tuple, optional\n            Size of dense output layers, default is (256, 1024)\n        dropout : float, optional\n            Dropout rate, default is 0.1\n\n        Returns\n        -------\n        keras.model\n            Fully connected top model\n\n        '
    model = Sequential()
    model.add(Flatten(input_shape=input_shape))
    model.add(Dense(dense_output[0]))
    model.add(Dropout(dropout))
    model.add(Dense(dense_output[1], activation='relu'))
    model.add(Dense(1, activation='sigmoid'))
    return model