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
#dump, from_hash, load, #update
Constructor Details
#initialize(lr = 0.0001, alpha: 0.95, eps: 0.0001, clip_norm: nil) ⇒ RMSPropGraves
Returns a new instance of RMSPropGraves.
238 239 240 241 242 243 244 245 246 |
# File 'lib/dnn/core/optimizers.rb', line 238 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 = {} @status = { m: @m, v: @v } end |
Instance Attribute Details
#alpha ⇒ Object
Returns the value of attribute alpha.
232 233 234 |
# File 'lib/dnn/core/optimizers.rb', line 232 def alpha @alpha end |
#eps ⇒ Object
Returns the value of attribute eps.
233 234 235 |
# File 'lib/dnn/core/optimizers.rb', line 233 def eps @eps end |
#lr ⇒ Object
Returns the value of attribute lr.
231 232 233 |
# File 'lib/dnn/core/optimizers.rb', line 231 def lr @lr end |
Instance Method Details
#load_hash(hash) ⇒ Object
262 263 264 |
# File 'lib/dnn/core/optimizers.rb', line 262 def load_hash(hash) initialize(hash[:lr], alpha: hash[:alpha], eps: hash[:eps], clip_norm: hash[:clip_norm]) end |
#to_hash ⇒ Object
248 249 250 |
# File 'lib/dnn/core/optimizers.rb', line 248 def to_hash super(lr: @lr, alpha: @alpha, eps: @eps) end |