W2 Lab3: LearningRateScheduler does not work in my PC Jupyternote Book

Hi,
I am running the Lab 3 in Jupyter notebook in my PC, not on the Coursera platform.
And the callbacks function to set the learning rate for the single Neural Network does not seem working.
It does not display the trace of ‘lr’ during the training.
The visualization does display only the frame of the chart but not the chart itself.

I just wonder if I need to insert extra lines to use tf.keras.callbacks.LearningRateScheduler on my PC.

I would appreciate it if anyone can advise me how to resolve this issue.
Thanks
Best Regards,
Michio

Learning rate scheduler argument is a function that takes the current epoch as a parameter and returns a learning rate. You can add print statements to see the scheduler in action. Here’s an example:

def get_learning_rate(epoch):
    learning_rate = 1e-3/(epoch+1)
    print(f'Learning rate for epoch {epoch} is {learning_rate}')
    return learning_rate

learning_rate_scheduler = tf.keras.callbacks.LearningRateScheduler(get_learning_rate)

# update xs and ys with actual training variables
model.fit(xs, ys,
         callbacks=[learning_rate_scheduler],
          epochs=10)