lib/dnn/core/optimizers.rb in ruby-dnn-0.8.0 vs lib/dnn/core/optimizers.rb in ruby-dnn-0.8.1
- old
+ new
@@ -9,10 +9,12 @@
@learning_rate = learning_rate
end
# Update params.
# Classes that inherit from this class must implement this method.
- # def update(params) end
+ def update(params)
+ raise NotImplementedError.new("Class '#{self.class.name}' has implement method 'update'")
+ end
def to_hash(merge_hash = nil)
hash = {class: self.class.name, learning_rate: @learning_rate}
hash.merge!(merge_hash) if merge_hash
hash