class DNN::Regularizers::L2
Public Class Methods
Public Instance Methods
forward(x)
click to toggle source
# File lib/dnn/core/regularizers.rb, line 64 def forward(x) x + @l2.(@param) end
l2_lambda()
click to toggle source
# File lib/dnn/core/regularizers.rb, line 68 def l2_lambda @l2.l2_lambda end
l2_lambda=(lam)
click to toggle source
# File lib/dnn/core/regularizers.rb, line 72 def l2_lambda=(lam) @l2.l2_lambda = lam end
load_hash(hash)
click to toggle source
# File lib/dnn/core/regularizers.rb, line 80 def load_hash(hash) initialize(hash[:l2_lambda]) end
to_hash()
click to toggle source
Calls superclass method
DNN::Regularizers::Regularizer#to_hash
# File lib/dnn/core/regularizers.rb, line 76 def to_hash super(l2_lambda: l2_lambda) end