berry.layers

Layer base class

Layer Base class for implementing a layer in berry.
get_all_aux_params Aggregate all auxiliary parameters from all the layers for training and testing.
print_layers_summary Print a nice formatted summary of the network.

Convolutional layers

Convolution2D 2D convolution layer

Recurrent layers

RNN RNN layer

Pooling layers

MaxPooling2D Pooling using the max operation

Dense layers

Dense Fully connected or dense layer

Shape layers

Flatten Flatten layer

Noise layers

Dropout Dropout layer

Helper Functions

Certain layers like Dropout require the definition of additional variables like p which takes on different values during train and test phase. For running any operation on the tensorflow graph (tf.Graph), it is necessary to feed in the value to p variable as well. In order to handle such situations, a convenient function, get_all_aux_params() is provided which aggregates such variables along with the appropriate values from all the layers according to the train/test phase.

For additional clarity on the model definition and in order to verify that the intended architecture is being created, one can use the print_layers_summary() function to print additional information about the layers.

braid.berry.layers.get_all_aux_params(deterministic)

Aggregate all auxiliary parameters from all the layers for training and testing.

deterministic
: bool
True for test phase and False for train phase.
dict
Dictionary with parameter name as “key” and their value as “value”.
braid.berry.layers.print_layers_summary(layers_list)

Print a nice formatted summary of the network.

layers_list
: list of Layer
List of layers.