Class: DNN::Optimizers::AdaDelta
- Defined in:
- lib/dnn/core/optimizers.rb
Instance Attribute Summary collapse
-
#eps ⇒ Object
Returns the value of attribute eps.
-
#rho ⇒ Object
Returns the value of attribute rho.
Attributes inherited from Optimizer
Instance Method Summary collapse
-
#initialize(rho: 0.95, eps: 1e-6, clip_norm: nil) ⇒ AdaDelta
constructor
A new instance of AdaDelta.
- #load_hash(hash) ⇒ Object
- #to_hash ⇒ Object
Methods inherited from Optimizer
#dump, from_hash, load, #update
Constructor Details
#initialize(rho: 0.95, eps: 1e-6, clip_norm: nil) ⇒ AdaDelta
Returns a new instance of AdaDelta.
198 199 200 201 202 203 204 205 |
# File 'lib/dnn/core/optimizers.rb', line 198 def initialize(rho: 0.95, eps: 1e-6, clip_norm: nil) super(clip_norm: clip_norm) @rho = rho @eps = eps @h = {} @s = {} @status = { h: @h, s: @s } end |
Instance Attribute Details
#eps ⇒ Object
Returns the value of attribute eps.
194 195 196 |
# File 'lib/dnn/core/optimizers.rb', line 194 def eps @eps end |
#rho ⇒ Object
Returns the value of attribute rho.
193 194 195 |
# File 'lib/dnn/core/optimizers.rb', line 193 def rho @rho end |
Instance Method Details
#load_hash(hash) ⇒ Object
222 223 224 |
# File 'lib/dnn/core/optimizers.rb', line 222 def load_hash(hash) initialize(rho: hash[:rho], eps: hash[:eps], clip_norm: hash[:clip_norm]) end |
#to_hash ⇒ Object
207 208 209 |
# File 'lib/dnn/core/optimizers.rb', line 207 def to_hash super(rho: @rho, eps: @eps) end |