/** * 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 = LegacyILossFunctionDeserializerHelper.class) public interface ILossFunction extends Serializable {
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class", defaultImpl = LegacyIActivationDeserializerHelper.class) @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") public interface IUpdater extends Serializable, Cloneable {
/** * Idea: We can't store all results in memory in general (might have thousands of candidates with millions of * parameters each) * So instead: return a reference to the saved result. Idea is that the result may be saved to disk or a database, * and we can easily load it back into memory (if/when required) using the getResult() method */ @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") public interface ResultReference { OptimizationResult getResult() throws IOException; }
/** * Idea: We can't store all results in memory in general (might have thousands of candidates with millions of * parameters each) * So instead: return a reference to the saved result. Idea is that the result may be saved to disk or a database, * and we can easily load it back into memory (if/when required) using the getResult() method */ @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") public interface ResultReference { OptimizationResult getResult() throws IOException; Object getResultModel() throws IOException; }
/** * An abstract distribution. * */ @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = LegacyDistributionHelper.class) public abstract class Distribution implements Serializable, Cloneable { private static final long serialVersionUID = 5401741214954998498L; @Override public Distribution clone() { try { return (Distribution) super.clone(); } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } } }
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") public interface IOptimizationRunner {
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") public interface IOptimizationRunner {
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY) public abstract class BaseHistogram {
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY) public interface IEvaluation<T extends IEvaluation> extends Serializable {
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY) public abstract class BaseCurve { public static final int DEFAULT_FORMAT_PREC = 4;
/** * Custom step function for line search. */ @JsonTypeInfo(use = Id.NAME, include = As.WRAPPER_OBJECT) @JsonSubTypes(value = {@JsonSubTypes.Type(value = DefaultStepFunction.class, name = "default"), @JsonSubTypes.Type(value = GradientStepFunction.class, name = "gradient"), @JsonSubTypes.Type(value = NegativeDefaultStepFunction.class, name = "negativeDefault"), @JsonSubTypes.Type(value = NegativeGradientStepFunction.class, name = "negativeGradient"),}) public class StepFunction implements Serializable, Cloneable { private static final long serialVersionUID = -1884835867123371330L; @Override public StepFunction clone() { try { StepFunction clone = (StepFunction) super.clone(); return clone; } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } } }
/** * Global termination condition for conducting hyperparameter optimization. * Termination conditions are used to determine if/when the optimization should stop. */ @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") @JsonInclude(JsonInclude.Include.NON_NULL) public interface TerminationCondition { /** * Initialize the termination condition (such as starting timers, etc). */ void initialize(IOptimizationRunner optimizationRunner); /** * Determine whether optimization should be terminated * * @param optimizationRunner Optimization runner * @return true if learning should be terminated, false otherwise */ boolean terminate(IOptimizationRunner optimizationRunner); }
/** * Global termination condition for conducting hyperparameter optimization. * Termination conditions are used to determine if/when the optimization should stop. */ @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") @JsonInclude(JsonInclude.Include.NON_NULL) public interface TerminationCondition { /** * Initialize the termination condition (such as starting timers, etc). */ void initialize(IOptimizationRunner optimizationRunner); /** * Determine whether optimization should be terminated * * @param optimizationRunner Optimization runner * @return true if learning should be terminated, false otherwise */ boolean terminate(IOptimizationRunner optimizationRunner); }
/** * DataProvider interface abstracts out the providing of data */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") public interface DataProvider extends Serializable { /** * Get training data given some parameters for the data. * Data parameters map is used to specify things like batch * size data preprocessing * * @param dataParameters Parameters for data. May be null or empty for default data * @return training data */ Object trainData(Map<String, Object> dataParameters); /** * Get training data given some parameters for the data. Data parameters map is used to specify things like batch * size data preprocessing * * @param dataParameters Parameters for data. May be null or empty for default data * @return training data */ Object testData(Map<String, Object> dataParameters); Class<?> getDataType(); }
/** * DataProvider interface abstracts out the providing of data */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") public interface DataProvider extends Serializable { /** * Get training data given some parameters for the data. * Data parameters map is used to specify things like batch * size data preprocessing * * @param dataParameters Parameters for data. May be null or empty for default data * @return training data */ Object trainData(Map<String, Object> dataParameters); /** * Get training data given some parameters for the data. Data parameters map is used to specify things like batch * size data preprocessing * * @param dataParameters Parameters for data. May be null or empty for default data * @return training data */ Object testData(Map<String, Object> dataParameters); Class<?> getDataType(); }
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") public interface ResultSaver {
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") public interface ResultSaver {
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.WRAPPER_OBJECT) @JsonSubTypes(value = {@JsonSubTypes.Type(value = ChartHistogram.class, name = "ChartHistogram"), @JsonSubTypes.Type(value = ChartHorizontalBar.class, name = "ChartHorizontalBar"),