org.deeplearning4j.ui.flow.beans.ModelState Maven / Gradle / Ivy
package org.deeplearning4j.ui.flow.beans;
import lombok.Data;
import java.io.Serializable;
import java.util.*;
/**
* @author [email protected]
*/
@Data
public class ModelState implements Serializable {
private float score = 0.0f;
private String trainingTime;
private List scores = new ArrayList<>();
private float performanceBatches;
private float performanceSamples;
private long iterationTime;
private Map parameters = new HashMap<>();
private Map gradients = new HashMap<>();
private List learningRates = new ArrayList<>();
private Map layerParams = new LinkedHashMap<>();
//private List performanceBatches = new ArrayList<>();
//private List performanceSamples = new ArrayList<>();
public ModelState() {
}
public void addScore(float score) {
if (scores.size() > 1000)
scores.remove(0);
scores.add(score);
}
public void addPerformanceBatches(float perf) {
performanceBatches = perf;
}
public void addPerformanceSamples(float perf) {
performanceSamples = perf;
}
/*
public void addPerformanceBatches(float perf) {
if (performanceBatches.size() > 100)
performanceBatches.remove(0);
performanceBatches.add(perf);
}
public void addPerformanceSamples(float perf) {
if (performanceSamples.size() > 100)
performanceSamples.remove(0);
performanceSamples.add(perf);
}
*/
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy