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
: boolTrue
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.