Class: DNN::Optimizers::RMSProp
- 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.001, alpha: 0.9, eps: 1e-7) ⇒ RMSProp
constructor
A new instance of RMSProp.
- #to_hash ⇒ Object
Methods inherited from Optimizer
Constructor Details
#initialize(learning_rate = 0.001, alpha: 0.9, eps: 1e-7) ⇒ RMSProp
Returns a new instance of RMSProp.
139 140 141 142 143 144 |
# File 'lib/dnn/core/optimizers.rb', line 139 def initialize(learning_rate = 0.001, alpha: 0.9, eps: 1e-7) super(learning_rate) @alpha = alpha @eps = eps @g = {} end |
Instance Attribute Details
#alpha ⇒ Float
Return the alpha value.
128 129 130 |
# File 'lib/dnn/core/optimizers.rb', line 128 def alpha @alpha end |
#eps ⇒ Float
Return the eps value.
130 131 132 |
# File 'lib/dnn/core/optimizers.rb', line 130 def eps @eps end |
Class Method Details
.from_hash(hash) ⇒ Object
132 133 134 |
# File 'lib/dnn/core/optimizers.rb', line 132 def self.from_hash(hash) self.new(hash[:learning_rate], alpha: hash[:alpha], eps: hash[:eps]) end |
Instance Method Details
#to_hash ⇒ Object
146 147 148 |
# File 'lib/dnn/core/optimizers.rb', line 146 def to_hash super(alpha: @alpha, eps: @eps) end |