/** * Returns the width of each label vector. * @return Width of label vectors expected. */ @JsonProperty("labelWidth") public int getLabelWidth() { return mLabelWidth; }
public ExponentialSchedule(@JsonProperty("scheduleType") ScheduleType scheduleType, @JsonProperty("initialValue") double initialValue, @JsonProperty("gamma") double gamma){ this.scheduleType = scheduleType; this.initialValue = initialValue; this.gamma = gamma; }
private AMSGrad(@JsonProperty("learningRate") double learningRate, @JsonProperty("learningRateSchedule") ISchedule learningRateSchedule, @JsonProperty("beta1") double beta1, @JsonProperty("beta2") double beta2, @JsonProperty("epsilon") double epsilon){ this.learningRate = learningRate; this.learningRateSchedule = learningRateSchedule; this.beta1 = beta1; this.beta2 = beta2; this.epsilon = epsilon; }
public StepSchedule(@JsonProperty("scheduleType") ScheduleType scheduleType, @JsonProperty("initialValue") double initialValue, @JsonProperty("decayRate") double decayRate, @JsonProperty("step") double step){ this.scheduleType = scheduleType; this.initialValue = initialValue; this.decayRate = decayRate; this.step = step; }
/** * Returns the number of gaussians this loss function * will attempt to find. * @return Number of gaussians to find. */ @JsonProperty("mixtures") public int getNMixtures() { return mMixtures; }
private Nadam(@JsonProperty("learningRate") double learningRate, @JsonProperty("learningRateSchedule") ISchedule learningRateSchedule, @JsonProperty("beta1") double beta1, @JsonProperty("beta2") double beta2, @JsonProperty("epsilon") double epsilon){ this.learningRate = learningRate; this.learningRateSchedule = learningRateSchedule; this.beta1 = beta1; this.beta2 = beta2; this.epsilon = epsilon; }
public PolySchedule(@JsonProperty("scheduleType") ScheduleType scheduleType, @JsonProperty("initialValue") double initialValue, @JsonProperty("power") double power, @JsonProperty("maxIter") int maxIter){ this.scheduleType = scheduleType; this.initialValue = initialValue; this.power = power; this.maxIter = maxIter; }
private Adam(@JsonProperty("learningRate") double learningRate, @JsonProperty("learningRateSchedule") ISchedule learningRateSchedule, @JsonProperty("beta1") double beta1, @JsonProperty("beta2") double beta2, @JsonProperty("epsilon") double epsilon){ this.learningRate = learningRate; this.learningRateSchedule = learningRateSchedule; this.beta1 = beta1; this.beta2 = beta2; this.epsilon = epsilon; }
private AdaGrad(@JsonProperty("learningRate") double learningRate, @JsonProperty("learningRateSchedule") ISchedule learningRateSchedule, @JsonProperty("epsilon") double epsilon){ this.learningRate = learningRate; this.learningRateSchedule = learningRateSchedule; this.epsilon = epsilon; }
private AdaMax(@JsonProperty("learningRate") double learningRate, @JsonProperty("learningRateSchedule") ISchedule learningRateSchedule, @JsonProperty("beta1") double beta1, @JsonProperty("beta2") double beta2, @JsonProperty("epsilon") double epsilon){ this.learningRate = learningRate; this.learningRateSchedule = learningRateSchedule; this.beta1 = beta1; this.beta2 = beta2; this.epsilon = epsilon; }
public InverseSchedule(@JsonProperty("scheduleType") ScheduleType scheduleType, @JsonProperty("initialValue") double initialValue, @JsonProperty("gamma") double gamma, @JsonProperty("power") double power){ this.scheduleType = scheduleType; this.initialValue = initialValue; this.gamma = gamma; this.power = power; }
private Nesterovs(@JsonProperty("learningRate") double learningRate, @JsonProperty("learningRateSchedule") ISchedule learningRateSchedule, @JsonProperty("momentum") double momentum, @JsonProperty("momentumSchedule") ISchedule momentumISchedule){ this.learningRate = learningRate; this.learningRateSchedule = learningRateSchedule; this.momentum = momentum; this.momentumISchedule = momentumISchedule; }
private Sgd(@JsonProperty("learningRate") double learningRate, @JsonProperty("learningRateSchedule") ISchedule learningRateSchedule){ this.learningRate = learningRate; this.learningRateSchedule = learningRateSchedule; }
private RmsProp(@JsonProperty("learningRate") double learningRate, @JsonProperty("learningRateSchedule") ISchedule learningRateSchedule, @JsonProperty("rmsDecay") double rmsDecay, @JsonProperty("epsilon") double epsilon){ this.learningRate = learningRate; this.learningRateSchedule = learningRateSchedule; this.rmsDecay = rmsDecay; this.epsilon = epsilon; }
public SigmoidSchedule(@JsonProperty("scheduleType") ScheduleType scheduleType, @JsonProperty("initialValue") double initialValue, @JsonProperty("gamma") double gamma, @JsonProperty("stepSize") int stepSize){ this.scheduleType = scheduleType; this.initialValue = initialValue; this.gamma = gamma; this.stepSize = stepSize; }
public AtomicDouble(@JsonProperty("value") double value){ super(value); }
/** * This method constructs a mixture density cost function * which causes the network to learn a mixture of gaussian distributions * for each network output. The network will learn the 'alpha' (weight * for each distribution), the 'mu' or 'mean' of each distribution, * and the 'sigma' (standard-deviation) of the mixture. Together, * this distribution can be sampled according to the probability density * learned by the network. * * @param mixtures Number of gaussian mixtures to model. * @param labelWidth Size of the labels vector for each sample. */ private LossMixtureDensity(@JsonProperty("mixtures") int mixtures, @JsonProperty("labelWidth") int labelWidth) { mMixtures = mixtures; mLabelWidth = labelWidth; }
public LossFMeasure(@JsonProperty("beta") double beta) { if (beta <= 0) { throw new UnsupportedOperationException("Invalid value: beta must be > 0. Got: " + beta); } this.beta = beta; }
public MapSchedule(@JsonProperty("scheduleType") @NonNull ScheduleType scheduleType, @JsonProperty("values") @NonNull Map<Integer, Double> values) { if (!values.containsKey(0)) { throw new IllegalArgumentException("Invalid set of values: must contain initial value (position 0)"); } this.scheduleType = scheduleType; this.values = values; this.allKeysSorted = new int[values.size()]; int pos = 0; for (Integer i : values.keySet()) { allKeysSorted[pos++] = i; } Arrays.sort(allKeysSorted); }
/** * Binary cross entropy where each the output is * (optionally) weighted/scaled by a fixed scalar value. * Note that the weights array must be a row vector, of length equal to * the labels/output dimension 1 size. * A weight vector of 1s should give identical results to no weight vector. * * @param clipEps Epsilon value for clipping. Probabilities are clipped in range of [eps, 1-eps]. Default eps: 1e-5 * @param weights Weights array (row vector). May be null. */ public LossBinaryXENT(@JsonProperty("clipEps") double clipEps, @JsonProperty("weights") INDArray weights){ if (weights != null && !weights.isRowVector()) { throw new IllegalArgumentException("Weights array must be a row vector"); } if(clipEps < 0 || clipEps > 0.5){ throw new IllegalArgumentException("Invalid clipping epsilon value: epsilon should be >= 0 (but near zero)." + "Got: " + clipEps); } this.clipEps = clipEps; this.weights = weights; }