lib/dnn/core/layers.rb in ruby-dnn-0.7.2 vs lib/dnn/core/layers.rb in ruby-dnn-0.7.3

- old
+ new

@@ -17,14 +17,16 @@ def built? @built end # Forward propagation. - def forward() end + # Classes that inherit from this class must implement this method. + # def forward() end # Backward propagation. - def backward() end + # Classes that inherit from this class must implement this method. + # def backward() end # Get the shape of the layer. def shape prev_layer.shape end @@ -100,14 +102,15 @@ super({shape: @shape}) end end + # It is a superclass of all connection layers. class Connection < HasParamLayer include Initializers - attr_reader :l1_lambda - attr_reader :l2_lambda + attr_reader :l1_lambda # L1 regularization + attr_reader :l2_lambda # L2 regularization def initialize(weight_initializer: nil, bias_initializer: nil, l1_lambda: 0, l2_lambda: 0)