Class: DNN::Regularizers::Regularizer

Inherits:
Object
  • Object
show all
Defined in:
lib/dnn/core/regularizers.rb

Direct Known Subclasses

L1, L1L2, L2

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#param ⇒ Object

Returns the value of attribute param.



5
6
7
# File 'lib/dnn/core/regularizers.rb', line 5

def param
  @param
end

Instance Method Details

#backward ⇒ Object

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/dnn/core/regularizers.rb', line 11

def backward
  raise NotImplementedError.new("Class '#{self.class.name}' has implement method 'backward'")
end

#forward(x) ⇒ Object

Raises:

  • (NotImplementedError)


7
8
9
# File 'lib/dnn/core/regularizers.rb', line 7

def forward(x)
  raise NotImplementedError.new("Class '#{self.class.name}' has implement method 'forward'")
end

#to_hash(merge_hash) ⇒ Object



15
16
17
18
19
# File 'lib/dnn/core/regularizers.rb', line 15

def to_hash(merge_hash)
  hash = {class: self.class.name}
  hash.merge!(merge_hash)
  hash
end