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
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(rho: 0.95, eps: 1e-6, clip_norm: nil) ⇒ AdaDelta
constructor
A new instance of AdaDelta.
- #to_hash ⇒ Object
Methods inherited from Optimizer
Constructor Details
#initialize(rho: 0.95, eps: 1e-6, clip_norm: nil) ⇒ AdaDelta
Returns a new instance of AdaDelta.
191 192 193 194 195 196 197 198 |
# File 'lib/dnn/core/optimizers.rb', line 191 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.
183 184 185 |
# File 'lib/dnn/core/optimizers.rb', line 183 def eps @eps end |
#rho ⇒ Object
Returns the value of attribute rho.
182 183 184 |
# File 'lib/dnn/core/optimizers.rb', line 182 def rho @rho end |
Class Method Details
.from_hash(hash) ⇒ Object
185 186 187 |
# File 'lib/dnn/core/optimizers.rb', line 185 def self.from_hash(hash) self.new(rho: hash[:rho], eps: hash[:eps], clip_norm: hash[:clip_norm]) end |
Instance Method Details
#to_hash ⇒ Object
200 201 202 |
# File 'lib/dnn/core/optimizers.rb', line 200 def to_hash super(rho: @rho, eps: @eps) end |