abstract - abstraction class¶
yann.layers.abstract.py contains the definition for the abstract layer:
- LSTM / GRN layers
- An Embed layer that is going to create a new embedding space for two layer’s activations to project on to the same space and minimize its distances.
layer(id, type, verbose=2)¶
Prototype for what a layer should look like. Every layer should inherit from this. This is a template class do not use this directly, you need to use a specific type of layer which again will be called by
- id – String
- origin – String id
- type – string-
self.output_shapefor outside calls and purposes.
This method returns the parameters of the layer in a numpy ndarray format.
- borrow – Theano borrow, default is True.
- verbose – As always
This is a slow method, because we are taking the values out of GPU. Ordinarily, I should have used get_value( borrow = True ), but I can’t do this because some parameters are theano.tensor.var.TensorVariable which needs to be run through eval.
print_layer(prefix=' ', nest=True, last=True, verbose=2)¶
Print information about the layer
- nest – If True will print the tree from here on. If False it will print only this layer.
- prefix – Is what prefix you want to add to the network print command.