Class Reshape

java.lang.Object
mklab.JGNN.nn.NNOperation
mklab.JGNN.nn.operations.Reshape

public class Reshape extends NNOperation
Implements a NNOperation that reshapes a matrix.
Author:
Emmanouil Krasanakis
  • Constructor Details

    • Reshape

      public Reshape(long rows, long cols)
  • Method Details

    • forward

      protected Tensor forward(List<Tensor> inputs)
      Specified by:
      forward in class NNOperation
    • getSimpleDescription

      public String getSimpleDescription()
      Description copied from class: NNOperation
      Provides a simple description to show when drawing .dot format diagrams.
      Overrides:
      getSimpleDescription in class NNOperation
      Returns:
      A string description, usually the component's class name.
    • partial

      protected Tensor partial(int inputId, List<Tensor> inputs, Tensor output, Tensor error)
      Specified by:
      partial in class NNOperation
    • isCachable

      public boolean isCachable()
      Description copied from class: NNOperation
      Checks whether the operation's output should be cached given that it is a constant. This returns false only for randomized components that yield different outputs from different inputs, such as dropouts.
      Overrides:
      isCachable in class NNOperation
      Returns:
      A boolean values.
    • setDimensionName

      public Reshape setDimensionName(String rowName, String colName)