Tensforflow schedule - does not change boundaries I'm trying to manipulate the learning rate with tf PiecewiseConstantDecay.
I can easily check if the algorithm switches learning rate values, because one rate is extremely low 1e-20 !!
However, NO setting of the &quot;boundaries&quot; causes the algorithm to switch learning rate... What am I doing wrong?
step = tf.Variable(0, trainable=False)
boundaries = [100]
values = [1e2, 1e-20]

schedule = tf.optimizers.schedules.PiecewiseConstantDecay(boundaries, values)
lr = 1e-4 * schedule(step)

optimizer = tf.keras.optimizers.Adam(learning_rate=lr)
model.compile(optimizer=optimizer, loss='mean_squared_error')

history = model.fit(x = x_train, y = y_train, validation_data=(x_val, y_val), epochs=100,batch_size=32)

Would love your input.
After 100 steps learning rate will switch from 1e-2 to 1e-24.
What exactly is the problem here? Are you confusing steps with epochs?