Dynamic optimizer

Hi! I use tf js, and i have a question
example

        let optimizer = tf.train.adam(0.1, 0.99, 0.999)
        this.model = tf.sequential();
        this.model.add( tf.layers.dense({ inputShape: [units], units: units, activation: 'linear' }));
        this.model.compile({
            optimizer,
            loss: tf.losses.meanSquaredError
        });

How create dynamic optimizer? When i started all work fine, BUT later need more accuracity because I get a lot of losses, not enough accuracy. And if I do high fidelity right away, it takes a VERY long time.
Example

let optimizer = tf.train.adam(0.001, 0.999, 0.9999)

How to make it so that when you get errors - increased accuracy?