Class: DNN::Optimizers::RMSPropGraves
- Defined in:
- lib/dnn/core/optimizers.rb
Instance Attribute Summary collapse
-
#alpha ⇒ Object
Returns the value of attribute alpha.
-
#eps ⇒ Object
Returns the value of attribute eps.
-
#lr ⇒ Object
Returns the value of attribute lr.
Attributes inherited from Optimizer
Instance Method Summary collapse
-
#initialize(lr: 0.0001, alpha: 0.95, eps: 0.0001, clip_norm: nil) ⇒ RMSPropGraves
constructor
A new instance of RMSPropGraves.
- #load_hash(hash) ⇒ Object
- #to_hash ⇒ Object
Methods inherited from Optimizer
from_hash, #update, #update_layers
Constructor Details
#initialize(lr: 0.0001, alpha: 0.95, eps: 0.0001, clip_norm: nil) ⇒ RMSPropGraves
Returns a new instance of RMSPropGraves.
218 219 220 221 222 223 224 225 |
# File 'lib/dnn/core/optimizers.rb', line 218 def initialize(lr: 0.0001, alpha: 0.95, eps: 0.0001, clip_norm: nil) super(clip_norm: clip_norm) @lr = lr @alpha = alpha @eps = eps @m = {} @v = {} end |
Instance Attribute Details
#alpha ⇒ Object
Returns the value of attribute alpha.
212 213 214 |
# File 'lib/dnn/core/optimizers.rb', line 212 def alpha @alpha end |
#eps ⇒ Object
Returns the value of attribute eps.
213 214 215 |
# File 'lib/dnn/core/optimizers.rb', line 213 def eps @eps end |
#lr ⇒ Object
Returns the value of attribute lr.
211 212 213 |
# File 'lib/dnn/core/optimizers.rb', line 211 def lr @lr end |
Instance Method Details
#load_hash(hash) ⇒ Object
241 242 243 |
# File 'lib/dnn/core/optimizers.rb', line 241 def load_hash(hash) initialize(lr: hash[:lr], alpha: hash[:alpha], eps: hash[:eps], clip_norm: hash[:clip_norm]) end |
#to_hash ⇒ Object
227 228 229 |
# File 'lib/dnn/core/optimizers.rb', line 227 def to_hash super(lr: @lr, alpha: @alpha, eps: @eps) end |