/** * Returns the width of each label vector. * @return Width of label vectors expected. */ @JsonProperty("labelWidth") public int getLabelWidth() { return mLabelWidth; }
/** * ISchedule: a general purpose interface for getting values according to some schedule. * Used for implementing learning rate, dropout and momentum schedules - and in principle, any univariate (double) * value that deponds on the current iteration and epochs numbers.<br> * <br> * Note: ISchedule objects should not have mutable state - i.e., they should be safe to share between multiple * locations/layers. * * @author Alex Black */ @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") public interface ISchedule extends Serializable, Cloneable { /** * @param iteration Current iteration number. Starts at 0 * @param epoch Current epoch number. Starts at 0 * @return Value at the current iteration/epoch for this schedule */ double valueAt(int iteration, int epoch); ISchedule clone(); }
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class", defaultImpl = LegacyIActivationDeserializerHelper.class) @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) public interface IActivation extends Serializable {
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; }