Class: DNN::Layers::OutputLayer
Direct Known Subclasses
Activations::IdentityHuber, Activations::IdentityMAE, Activations::IdentityMSE, Activations::SigmoidWithLoss, Activations::SoftmaxWithLoss
Instance Method Summary collapse
- #dloss ⇒ Object
-
#loss(x) ⇒ Object
Classes that inherit from this class must implement this method.
Methods inherited from Layer
#backward, #build, #built?, #forward, #initialize, #prev_layer, #shape, #to_hash
Constructor Details
This class inherits a constructor from DNN::Layers::Layer
Instance Method Details
#dloss ⇒ Object
277 278 279 280 281 282 |
# File 'lib/dnn/core/layers.rb', line 277 def dloss @model.get_all_layers.select { |layer| layer.is_a?(Connection) }.each do |layer| layer.dlasso layer.dridge end end |
#loss(x) ⇒ Object
Classes that inherit from this class must implement this method.
273 274 275 |
# File 'lib/dnn/core/layers.rb', line 273 def loss(x) raise NotImplementedError.new("Class '#{self.class.name}' has implement method 'forward'") end |