Class: DNN::MergeLayers::Add
- Inherits:
-
MergeLayer
- Object
- Layers::Layer
- MergeLayer
- DNN::MergeLayers::Add
- Defined in:
- lib/dnn/core/merge_layers.rb
Instance Attribute Summary
Attributes inherited from Layers::Layer
Instance Method Summary collapse
Methods inherited from MergeLayer
Methods inherited from Layers::Layer
#build, #built?, call, #call, from_hash, #initialize, #load_hash, #output_shape, #to_hash
Constructor Details
This class inherits a constructor from DNN::Layers::Layer
Instance Method Details
#backward(dy) ⇒ Object
26 27 28 |
# File 'lib/dnn/core/merge_layers.rb', line 26 def backward(dy) [dy, dy] end |
#forward(x1, x2) ⇒ Object
22 23 24 |
# File 'lib/dnn/core/merge_layers.rb', line 22 def forward(x1, x2) x1 + x2 end |