Example usage for org.deeplearning4j.nn.conf Updater CUSTOM

List of usage examples for org.deeplearning4j.nn.conf Updater CUSTOM

Introduction

In this page you can find the example usage for org.deeplearning4j.nn.conf Updater CUSTOM.

Prototype

Updater CUSTOM

To view the source code for org.deeplearning4j.nn.conf Updater CUSTOM.

Click Source Link

Usage

From source file:org.wso2.carbon.ml.rest.api.neuralNetworks.FeedForwardNetwork.java

License:Open Source License

/**
 * method to map user selected Updater Algorithm to Updater object.
 * @param updater//from  www . ja  v  a  2s.  com
 * @return an Updater object .
 */
Updater mapUpdater(String updater) {

    Updater updaterAlgo = null;

    switch (updater) {

    case "sgd":
        updaterAlgo = Updater.SGD;
        break;

    case "adam":
        updaterAlgo = Updater.ADAM;
        break;

    case "adadelta":
        updaterAlgo = Updater.ADADELTA;
        break;

    case "nesterovs":
        updaterAlgo = Updater.NESTEROVS;
        break;

    case "adagrad":
        updaterAlgo = Updater.ADAGRAD;
        break;

    case "rmsprop":
        updaterAlgo = Updater.RMSPROP;
        break;

    case "none":
        updaterAlgo = Updater.NONE;
        break;

    case "custom":
        updaterAlgo = Updater.CUSTOM;
        break;

    default:
        updaterAlgo = null;
        break;
    }
    return updaterAlgo;
}