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

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

Introduction

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

Prototype

Updater NONE

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

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   w ww .j a v  a 2 s  .c  o m
 * @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;
}