Class: DNN::Layers::Layer
- Inherits:
-
Object
- Object
- DNN::Layers::Layer
- Includes:
- Numo
- Defined in:
- lib/dnn/core/layers.rb
Overview
Super class of all optimizer classes.
Direct Known Subclasses
Dropout, Flatten, HasParamLayer, InputLayer, MaxPool2D, OutputLayer, Reshape
Instance Method Summary collapse
-
#backward ⇒ Object
Backward propagation.
-
#forward ⇒ Object
Forward propagation.
-
#init(model) ⇒ Object
Initialize layer when model is compiled.
-
#prev_layer ⇒ Object
Get the previous layer.
-
#shape ⇒ Object
Get the shape of the layer.
Instance Method Details
#backward ⇒ Object
Backward propagation.
17 |
# File 'lib/dnn/core/layers.rb', line 17 def backward() end |
#forward ⇒ Object
Forward propagation.
14 |
# File 'lib/dnn/core/layers.rb', line 14 def forward() end |
#init(model) ⇒ Object
Initialize layer when model is compiled.
9 10 11 |
# File 'lib/dnn/core/layers.rb', line 9 def init(model) @model = model end |
#prev_layer ⇒ Object
Get the previous layer.
25 26 27 |
# File 'lib/dnn/core/layers.rb', line 25 def prev_layer @model.layers[@model.layers.index(self) - 1] end |
#shape ⇒ Object
Get the shape of the layer.
20 21 22 |
# File 'lib/dnn/core/layers.rb', line 20 def shape prev_layer.shape end |