Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: clip_grad doesn't work #11691

Open
Pixie8888 opened this issue May 8, 2024 · 0 comments
Open

BUG: clip_grad doesn't work #11691

Pixie8888 opened this issue May 8, 2024 · 0 comments
Assignees

Comments

@Pixie8888
Copy link

Hi,

Although I set clip_grad as below, but the grad_norm still explodes... Can anyone help me?

optim_wrapper = dict(
    type='OptimWrapper',
    optimizer=dict(
        _delete_=True, type='AdamW', lr=0.0001, weight_decay=0.0001),
    paramwise_cfg=dict(
        custom_keys={'backbone': dict(lr_mult=0.1, decay_mult=1.0)}),
    clip_grad=dict(max_norm=35., norm_type=2))

image

@Pixie8888 Pixie8888 changed the title clip_grad doesn't work BUG: clip_grad doesn't work May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants