home | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (EarlyStoppingListener.java)

This example Java source code file (EarlyStoppingListener.java) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

earlystoppingconfiguration, earlystoppinglistener, model

The EarlyStoppingListener.java Java example source code

package org.deeplearning4j.earlystopping.listener;

import org.deeplearning4j.earlystopping.EarlyStoppingConfiguration;
import org.deeplearning4j.earlystopping.EarlyStoppingResult;
import org.deeplearning4j.nn.api.Model;

/**EarlyStoppingListener is a listener interface for conducting early stopping training.
 * It provides onStart, onEpoch, and onCompletion methods, which are called as appropriate
 * @param <T> Type of model. For example, {@link org.deeplearning4j.nn.multilayer.MultiLayerNetwork} or {@link org.deeplearning4j.nn.graph.ComputationGraph}
 */
public interface EarlyStoppingListener<T extends Model> {

    /**Method to be called when early stopping training is first started
     */
    void onStart(EarlyStoppingConfiguration<T> esConfig, T net);

    /**Method that is called at the end of each epoch completed during early stopping training
     * @param epochNum The number of the epoch just completed (starting at 0)
     * @param score The score calculated
     * @param esConfig Configuration
     * @param net Network (current)
     */
    void onEpoch(int epochNum, double score, EarlyStoppingConfiguration<T> esConfig, T net);

    /**Method that is called at the end of early stopping training
     * @param esResult The early stopping result. Provides details of why early stopping training was terminated, etc
     */
    void onCompletion(EarlyStoppingResult<T> esResult);

}

Other Java examples (source code examples)

Here is a short list of links related to this Java EarlyStoppingListener.java source code file:



my book on functional programming

 

new blog posts

 

Copyright 1998-2019 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.