Skip to content

[WIP] First test auto adaptive - #16

Open
jiachend wants to merge 6 commits into
mainfrom
auto-adaptive-clipping
Open

[WIP] First test auto adaptive#16
jiachend wants to merge 6 commits into
mainfrom
auto-adaptive-clipping

Conversation

@jiachend

Copy link
Copy Markdown
Collaborator

No description provided.

@jiachend
jiachend requested a review from lguerdan April 28, 2022 19:36
@jiachend jiachend changed the title First test auto adaptive [WIP] First test auto adaptive Apr 28, 2022
Comment thread train.py
saved_var[tensor_name].add_(new_grad)
model.zero_grad()

gamma += (b/num_microbatches-gamma)/2

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve been thinking about this more. Intuitively, we want to favor a clipping threshold at the beginning of training that has low bias, but higher variance. In this case, it’s ok that we add a higher clipping threshold in exchange for more noise because the low bias in the estimate helps the model converge towards a good initial solution. However, later on, its important that there is little noise added to the parameter estimate (low variance) so that the model can learn finer grained details.

See discussion by Andrew et. al, for example
image

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One idea is to taper the gamma value over training (akin to a learning rate scheduler). It would be cool if we could somehow estimate the bias / variance trade off during training. One way is to look at the delta between training and validation loss, which is normally taken as a measure of overfitting. I'll try the gamma tapering approach tomorrow morning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants