class DNN::Regularizers::L1
Public Class Methods
Public Instance Methods
forward(x)
click to toggle source
# File lib/dnn/core/regularizers.rb, line 37 def forward(x) x + @l1.(@param) end
l1_lambda()
click to toggle source
# File lib/dnn/core/regularizers.rb, line 41 def l1_lambda @l1.l1_lambda end
l1_lambda=(lam)
click to toggle source
# File lib/dnn/core/regularizers.rb, line 45 def l1_lambda=(lam) @l1.l1_lambda = lam end
load_hash(hash)
click to toggle source
# File lib/dnn/core/regularizers.rb, line 53 def load_hash(hash) initialize(hash[:l1_lambda]) end
to_hash()
click to toggle source
Calls superclass method
DNN::Regularizers::Regularizer#to_hash
# File lib/dnn/core/regularizers.rb, line 49 def to_hash super(l1_lambda: l1_lambda) end