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
235 236 237 238 239 240 241 242 243 |
# File 'lib/dnn/core/optimizers.rb', line 235 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.
229 230 231 |
# File 'lib/dnn/core/optimizers.rb', line 229 def alpha @alpha end |
#eps ⇒ Object
Returns the value of attribute eps.
230 231 232 |
# File 'lib/dnn/core/optimizers.rb', line 230 def eps @eps end |
#lr ⇒ Object
Returns the value of attribute lr.
228 229 230 |
# File 'lib/dnn/core/optimizers.rb', line 228 def lr @lr end |
Instance Method Details
#load_hash(hash) ⇒ Object
259 260 261 |
# File 'lib/dnn/core/optimizers.rb', line 259 def load_hash(hash) initialize(hash[:lr], alpha: hash[:alpha], eps: hash[:eps], clip_norm: hash[:clip_norm]) end |
#to_hash ⇒ Object
245 246 247 |
# File 'lib/dnn/core/optimizers.rb', line 245 def to_hash super(lr: @lr, alpha: @alpha, eps: @eps) end |