berry.BerryModel
¶
Helper class for constructing a neural network model using Berry
-
class
braid.berry.
BerryModel
¶ Helper class to create deep neural networks using Berry.
berry.BerryModel
maintains an ordered dictionary of layers added to the graph and provides access to the output of the model. It also provides easy access to auxiliary variables and the values taken by them during ‘train’ and ‘test’ phase.- layers : ordered dict
- All the layers which have been added to the graph. “Key” is the name
of the added object and the “value” is the object. Object can either
be of
berry.layers.Layer
class ortf.Tensor
class. - last :
- The last layer added to the model.
- output :
- The output tensor of the last layer added to the model.
- train_aux : dict
- Contains the auxiliary inputs for the model. The “key” is the name of the auxiliary variables and the “value” is the value taken by the variable during the training phase.
- test_aux : dict
- Contains the auxiliary inputs for the model. The “key” is the name of the auxiliary variables and the “value” is the value taken by the variable during the testing phase.
berry.layers.Layer
ortf.Tensor
tf.Tensor
-
add
(layer_instance)¶ Add another layer to the model.
- layer_instance :
- Insert the layer to the
dict
of layers,self.layers
.
Layer
ortf.Tensor
-
get
(layer_name)¶ Get an existing layer from the model.
- layer_name : string
- Name of the layer.
Layer
- The layer corresponding to the name,
layer_name
.
-
last
¶
-
layers
¶
-
output
¶
-
test_aux
¶
-
train_aux
¶