Class: DNN::Layers::Log
- Includes:
- LayerNode
- Defined in:
- lib/dnn/core/layers/math_layers.rb
Instance Attribute Summary
Attributes inherited from Layer
Instance Method Summary collapse
Methods included from LayerNode
Methods inherited from Layer
#<<, #build, #built?, #call, call, #clean, #compute_output_shape, #forward, from_hash, #initialize, #load_hash, #to_hash
Constructor Details
This class inherits a constructor from DNN::Layers::Layer
Instance Method Details
#backward_node(dy) ⇒ Object
156 157 158 |
# File 'lib/dnn/core/layers/math_layers.rb', line 156 def backward_node(dy) dy / @x end |
#forward_node(x) ⇒ Object
151 152 153 154 |
# File 'lib/dnn/core/layers/math_layers.rb', line 151 def forward_node(x) @x = x Xumo::NMath.log(x) end |