Are there any functions or methods which can show the learning rate when I use the tensorflow 2.0 custom training loop?
Here is an example of tensorflow guide:
def train_step(images, labels):
with tf.GradientTape() as tape:
predictions = model(images)
loss = loss_object(labels, predictions)
gradients = tape.gradient(loss, model.trainable_variables)
optimizer.apply_gradients(zip(gradients, model.trainable_variables))
train_loss(loss)
train_accuracy(labels, predictions)
How can I retrieve the current learning rate from the optimizer when the model is training?
I will be grateful for any help you can provide. :)