Interface Layer<O extends Tensor>

Type Parameters:
O - specific type of output tensor
All Superinterfaces:
Backward, Forward
All Known Implementing Classes:
AbstractLayer, CBOWEmbeddingLayer, ConvolutionalLayer, EmbeddingLayer, FlatEmbeddingLayer, FlattenLayer, FullyConnectedLayer, InputLayer, LayerNorm, MaxPoolingLayer, OutputLayer, SkipGramEmbeddingLayer, SoftmaxOutputLayer

public interface Layer<O extends Tensor> extends Forward, Backward
Common base interface for all types of neural network layers. Layer is a basic building block of a neural network. Neural network typically consists of a sequence of layers. Layer performs mathematical operations on it's inputs, and provides output which is used as an input for the next layer.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Performs weight parameters adjustment in backward pass during training of a neural network.
    void
    Performs calculation of layer outputs in forward pass of a neural network .
    Returns layer deltas/errors (as a tensor).
    Returns output of this layer (as a tensor).
  • Method Details

    • forward

      void forward()
      Performs calculation of layer outputs in forward pass of a neural network .
      Specified by:
      forward in interface Forward
    • backward

      void backward()
      Performs weight parameters adjustment in backward pass during training of a neural network.
      Specified by:
      backward in interface Backward
    • getOutputs

      O getOutputs()
      Returns output of this layer (as a tensor).
      Returns:
      layer output as a tensor
    • getDeltas

      O getDeltas()
      Returns layer deltas/errors (as a tensor). Deltas are accumulated errors propagated from the next layer.
      Returns:
      layer deltas tensor