"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Rprop = exports.LBFGS = exports.AdaBound = exports.LAMB = exports.AdaDelta = exports.RAdam = exports.NAdam = exports.AdaGrad = exports.RMSprop = exports.AdamW = exports.Adam = exports.SGD = void 0;
const { optimizers } = require('../../native_loader');
class SGD {
    constructor(params, lr, momentum = 0.0, weight_decay = 0.0) {
        this.inner = new optimizers.SGD(params, lr, momentum, weight_decay);
    }
    step() { this.inner.step(); }
    zeroGrad() { this.inner.zeroGrad(); }
}
exports.SGD = SGD;
class Adam {
    constructor(params, lr = 0.001, beta1 = 0.9, beta2 = 0.999, eps = 1e-8, weight_decay = 0.0) {
        this.inner = new optimizers.Adam(params, lr, beta1, beta2, eps, weight_decay);
    }
    step() { this.inner.step(); }
    zeroGrad() { this.inner.zeroGrad(); }
}
exports.Adam = Adam;
class AdamW {
    constructor(params, lr = 0.001, beta1 = 0.9, beta2 = 0.999, eps = 1e-8, weight_decay = 0.01) {
        this.inner = new optimizers.AdamW(params, lr, beta1, beta2, eps, weight_decay);
    }
    step() { this.inner.step(); }
    zeroGrad() { this.inner.zeroGrad(); }
}
exports.AdamW = AdamW;
class RMSprop {
    constructor(params, lr = 0.01, alpha = 0.99, eps = 1e-8, weight_decay = 0.0, momentum = 0.0) {
        this.inner = new optimizers.RMSprop(params, lr, alpha, eps, weight_decay, momentum);
    }
    step() { this.inner.step(); }
    zeroGrad() { this.inner.zeroGrad(); }
}
exports.RMSprop = RMSprop;
class AdaGrad {
    constructor(params, lr = 0.01, eps = 1e-10, weight_decay = 0.0) {
        this.inner = new optimizers.AdaGrad(params, lr, eps, weight_decay);
    }
    step() { this.inner.step(); }
    zeroGrad() { this.inner.zeroGrad(); }
}
exports.AdaGrad = AdaGrad;
class NAdam {
    constructor(params, lr = 0.002, beta1 = 0.9, beta2 = 0.999, eps = 1e-8, weight_decay = 0.0) {
        this.inner = new optimizers.NAdam(params, lr, beta1, beta2, eps, weight_decay);
    }
    step() { this.inner.step(); }
    zeroGrad() { this.inner.zeroGrad(); }
}
exports.NAdam = NAdam;
class RAdam {
    constructor(params, lr = 0.001, beta1 = 0.9, beta2 = 0.999, eps = 1e-8, weight_decay = 0.0) {
        this.inner = new optimizers.RAdam(params, lr, beta1, beta2, eps, weight_decay);
    }
    step() { this.inner.step(); }
    zeroGrad() { this.inner.zeroGrad(); }
}
exports.RAdam = RAdam;
class AdaDelta {
    constructor(params, rho = 0.9, eps = 1e-6, weight_decay = 0.0) {
        this.inner = new optimizers.AdaDelta(params, rho, eps, weight_decay);
    }
    step() { this.inner.step(); }
    zeroGrad() { this.inner.zeroGrad(); }
}
exports.AdaDelta = AdaDelta;
class LAMB {
    constructor(params, lr = 0.001, beta1 = 0.9, beta2 = 0.999, eps = 1e-6, weight_decay = 0.01) {
        this.inner = new optimizers.LAMB(params, lr, beta1, beta2, eps, weight_decay);
    }
    step() { this.inner.step(); }
    zeroGrad() { this.inner.zeroGrad(); }
}
exports.LAMB = LAMB;
class AdaBound {
    constructor(params, lr = 0.001, final_lr = 0.1, beta1 = 0.9, beta2 = 0.999, eps = 1e-8, weight_decay = 0.0, gamma = 1e-3) {
        this.inner = new optimizers.AdaBound(params, lr, final_lr, beta1, beta2, eps, weight_decay, gamma);
    }
    step() { this.inner.step(); }
    zeroGrad() { this.inner.zeroGrad(); }
}
exports.AdaBound = AdaBound;
class LBFGS {
    constructor(params, lr = 1.0, history_size = 100, max_iter = 20) {
        this.inner = new optimizers.LBFGS(params, lr, history_size, max_iter);
    }
    step() { this.inner.step(); }
    zeroGrad() { this.inner.zeroGrad(); }
}
exports.LBFGS = LBFGS;
class Rprop {
    constructor(params, lr_init = 0.01, eta_plus = 1.2, eta_minus = 0.5, lr_min = 1e-6, lr_max = 50.0) {
        this.inner = new optimizers.Rprop(params, lr_init, eta_plus, eta_minus, lr_min, lr_max);
    }
    step() { this.inner.step(); }
    zeroGrad() { this.inner.zeroGrad(); }
}
exports.Rprop = Rprop;
//# sourceMappingURL=index.js.map