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.BerryModelmaintains 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.Layerclass ortf.Tensorclass. - 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.Layerortf.Tensortf.Tensor-
add(layer_instance)¶ Add another layer to the model.
- layer_instance :
- Insert the layer to the
dictof layers,self.layers.
Layerortf.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¶