Class: DNN::Optimizers::RMSPropGraves
- Defined in:
- lib/dnn/core/optimizers.rb
Instance Attribute Summary collapse
-
#alpha ⇒ Float
Return the alpha value.
-
#eps ⇒ Float
Return the eps value.
Attributes inherited from Optimizer
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(learning_rate = 0.0001, alpha: 0.95, eps: 0.0001) ⇒ RMSPropGraves
constructor
A new instance of RMSPropGraves.
- #to_hash ⇒ Object
Methods inherited from Optimizer
Constructor Details
#initialize(learning_rate = 0.0001, alpha: 0.95, eps: 0.0001) ⇒ RMSPropGraves
Returns a new instance of RMSPropGraves.
261 262 263 264 265 266 267 |
# File 'lib/dnn/core/optimizers.rb', line 261 def initialize(learning_rate = 0.0001, alpha: 0.95, eps: 0.0001) super(learning_rate) @alpha = alpha @eps = eps @m = {} @v = {} end |
Instance Attribute Details
#alpha ⇒ Float
Return the alpha value.
250 251 252 |
# File 'lib/dnn/core/optimizers.rb', line 250 def alpha @alpha end |
#eps ⇒ Float
Return the eps value.
252 253 254 |
# File 'lib/dnn/core/optimizers.rb', line 252 def eps @eps end |
Class Method Details
.from_hash(hash) ⇒ Object
254 255 256 |
# File 'lib/dnn/core/optimizers.rb', line 254 def self.from_hash(hash) self.new(hash[:learning_rate], alpha: hash[:alpha], eps: hash[:eps]) end |
Instance Method Details
#to_hash ⇒ Object
269 270 271 |
# File 'lib/dnn/core/optimizers.rb', line 269 def to_hash super(alpha: @alpha, eps: @eps) end |