Class: DNN::Optimizers::AdaDelta
- Defined in:
- lib/dnn/core/optimizers.rb
Instance Attribute Summary collapse
-
#eps ⇒ Float
Return the eps value.
-
#rho ⇒ Float
Return the rho value.
Attributes inherited from Optimizer
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(rho: 0.95, eps: 1e-6) ⇒ AdaDelta
constructor
A new instance of AdaDelta.
- #to_hash ⇒ Object
Methods inherited from Optimizer
Constructor Details
#initialize(rho: 0.95, eps: 1e-6) ⇒ AdaDelta
Returns a new instance of AdaDelta.
170 171 172 173 174 175 176 |
# File 'lib/dnn/core/optimizers.rb', line 170 def initialize(rho: 0.95, eps: 1e-6) super(nil) @rho = rho @eps = eps @h = {} @s = {} end |
Instance Attribute Details
#eps ⇒ Float
Return the eps value.
162 163 164 |
# File 'lib/dnn/core/optimizers.rb', line 162 def eps @eps end |
#rho ⇒ Float
Return the rho value.
160 161 162 |
# File 'lib/dnn/core/optimizers.rb', line 160 def rho @rho end |
Class Method Details
.from_hash(hash) ⇒ Object
164 165 166 |
# File 'lib/dnn/core/optimizers.rb', line 164 def self.from_hash(hash) self.new(rho: hash[:rho], eps: hash[:eps]) end |
Instance Method Details
#to_hash ⇒ Object
178 179 180 |
# File 'lib/dnn/core/optimizers.rb', line 178 def to_hash super(rho: @rho, eps: @eps) end |