lib/rumale/optimizer/rmsprop.rb in rumale-0.18.2 vs lib/rumale/optimizer/rmsprop.rb in rumale-0.18.3
- old
+ new
@@ -40,25 +40,8 @@
@update ||= Numo::DFloat.zeros(weight.shape[0])
@moment = @params[:decay] * @moment + (1.0 - @params[:decay]) * gradient**2
@update = @params[:momentum] * @update - (@params[:learning_rate] / (@moment**0.5 + 1.0e-8)) * gradient
weight + @update
end
-
- # Dump marshal data.
- # @return [Hash] The marshal data.
- def marshal_dump
- { params: @params,
- moment: @moment,
- update: @update }
- end
-
- # Load marshal data.
- # @return [nil]
- def marshal_load(obj)
- @params = obj[:params]
- @moment = obj[:moment]
- @update = obj[:update]
- nil
- end
end
end
end