learn_rate_scheduler: Learning Rate Scheduler

View source: R/aided_chatgpt.R

learn_rate_schedulerR Documentation

Learning Rate Scheduler

Description

This function adjusts the learning rate at each epoch according to a custom schedule.

Usage

learn_rate_scheduler(initial_lr, schedule, epochs)

Arguments

initial_lr

A numeric value representing the initial learning rate.

schedule

A function that takes the epoch number as input and returns the adjusted learning rate.

epochs

An integer specifying the total number of epochs.

Value

A numeric vector representing the learning rate for each epoch.

Examples

schedule <- function(epoch) { 0.01 * (0.9 ^ epoch) }
learn_rate_scheduler(0.01, schedule, epochs = 10)


quickcode documentation built on April 11, 2025, 5:49 p.m.