Interface IOutputLayer

    • Method Detail

      • needsLabels

        boolean needsLabels()
        Returns true if labels are required for this output layer
        Returns:
        true if this output layer needs labels or not
      • setLabels

        void setLabels​(INDArray labels)
        Set the labels array for this output layer
        Parameters:
        labels - Labels array to set
      • getLabels

        INDArray getLabels()
        Get the labels array previously set with setLabels(INDArray)
        Returns:
        Labels array, or null if it has not been set
      • computeScore

        double computeScore​(double fullNetworkRegScore,
                            boolean training,
                            LayerWorkspaceMgr workspaceMgr)
        Compute score after labels and input have been set.
        Parameters:
        fullNetworkRegScore - Regularization score (l1/l2/weight decay) for the entire network
        training - whether score should be calculated at train or test time (this affects things like application of dropout, etc)
        Returns:
        score (loss function)
      • computeScoreForExamples

        INDArray computeScoreForExamples​(double fullNetworkRegScore,
                                         LayerWorkspaceMgr workspaceMgr)
        Compute the score for each example individually, after labels and input have been set.
        Parameters:
        fullNetworkRegScore - Regularization score (l1/l2/weight decay) for the entire network
        Returns:
        A column INDArray of shape [numExamples,1], where entry i is the score of the ith example