neureka.optimization.implementations.AdaGradFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neureka Show documentation
Show all versions of neureka Show documentation
A platform independent tensor library written in Java.
The newest version!
package neureka.optimization.implementations;
import neureka.Tensor;
import neureka.optimization.OptimizerFactory;
public class AdaGradFactory implements OptimizerFactory
{
private final double _learningRate;
public AdaGradFactory() { _learningRate = 0.01; }
// The copy constructor should be private, use withers instead!
private AdaGradFactory(double learningRate) {
_learningRate = learningRate;
}
// Withers:
public AdaGradFactory withLearningRate(double learningRate) {
return new AdaGradFactory(learningRate);
}
@Override
public AdaGrad create(Tensor target) {
return new AdaGrad<>(target, _learningRate);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy