Skip to content

A simple implementation of Adaptive Learning Rate Clipping for PyTorch (https://arxiv.org/abs/1906.09060)

Notifications You must be signed in to change notification settings

Axel-Jacobsen/ALRC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Adaptive Learning Rate Clipping Stabilizes Learning

A simple implementation of Adaptive Learning Rate Clipping in Pytorch.

Please see the paper (linked above) or the accompanying code for TensorFlow for a succinct and well-written paper and repo implementation. Below is a (very) simple example on how to use this PyTorch version:

model = Net()
loss = nn.MSELoss()
clipper = ALRC()
optimizer = optim.SGD(model.parameters(), ...)

for input, target in data:
    optimizer.zero_grad()

    output = model(input)
    loss = loss_fn(output, target)
    loss = clipper.clip(loss)

    loss.backward()
    optimizer.step()

About

A simple implementation of Adaptive Learning Rate Clipping for PyTorch (https://arxiv.org/abs/1906.09060)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages