Documentation of 'org.ea.javacnn.JavaCNN' Java class
JavaCNN
org.ea.javacnn

Class JavaCNN

  • All Implemented Interfaces:
    java.io.Serializable


    public class JavaCNN
    extends java.lang.Object
    implements java.io.Serializable
    A network class holding the layers and some helper functions for training and validation.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      JavaCNN(java.util.List<Layer> layers) 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double backward(int y)
      Backprop: compute gradients wrt all parameters
      DataBlock forward(DataBlock db, boolean training) 
      java.util.List<BackPropResult> getBackPropagationResult()
      Accumulate parameters and gradients for the entire network
      double getCostLoss(DataBlock db, int y) 
      int getPrediction()
      This is a convenience function for returning the argmax prediction, assuming the last layer of the net is a softmax
      java.lang.String getPredictions(int[] correctPredictions, int[] numberDistribution, int totalSize, int numOfClasses)
      Print prediction.
      static JavaCNN loadModel(java.lang.String fileName)
      Load the model of this neural network from a file.
      void saveModel(java.lang.String fileName)
      Save convolutional network to a file.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JavaCNN

        public JavaCNN(java.util.List<Layer> layers)
    • Method Detail

      • getCostLoss

        public double getCostLoss(DataBlock db,
                                  int y)
      • backward

        public double backward(int y)
        Backprop: compute gradients wrt all parameters
      • getBackPropagationResult

        public java.util.List<BackPropResult> getBackPropagationResult()
        Accumulate parameters and gradients for the entire network
      • getPrediction

        public int getPrediction()
        This is a convenience function for returning the argmax prediction, assuming the last layer of the net is a softmax
      • getPredictions

        public java.lang.String getPredictions(int[] correctPredictions,
                                               int[] numberDistribution,
                                               int totalSize,
                                               int numOfClasses)
        Print prediction.
      • saveModel

        public void saveModel(java.lang.String fileName)
        Save convolutional network to a file.
        Parameters:
        fileName - output file name.
      • loadModel

        public static JavaCNN loadModel(java.lang.String fileName)
        Load the model of this neural network from a file.
        Parameters:
        fileName - input file name
        Returns:

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.