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

How to modify in optimizer_config #39

Open
svamsip opened this issue May 12, 2023 · 2 comments
Open

How to modify in optimizer_config #39

svamsip opened this issue May 12, 2023 · 2 comments

Comments

@svamsip
Copy link

svamsip commented May 12, 2023

Hi Team
Great work and thanks for your contribution!

I'm working on training the mask_rcnn_focalnet_small_patch4_mstrain_480-800_adamw_3x_coco_lrf.py with custom dataset in coco format.

  • The DistOptimizerHook has been depreciated from mmcv.runner.hooks.optimizer and has been recommended to use OptimizerHook replacing the same.
    # do not use mmdet version fp16
    fp16 = None
    optimizer_config = dict(
       type="DistOptimizerHook",
       update_interval=1,
       grad_clip=None,
       coalesce=True, 
       bucket_size_mb=-1,
       use_fp16=True,
    )
  • I've replaced with below code which goes with default OptimizerHook
    # do not use mmdet version fp16
    fp16 = None
    optimizer_config = dict(
        grad_clip=None,
    )
  • Installed mmcv using source code:
    git clone https://github.com/open-mmlab/mmcv.git -b 1.x /openmmlab/mmcv \
    && cd /openmmlab/mmcv \
    && MMCV_WITH_OPS=1 pip install --no-cache-dir -e . -v

Would like to know recommended configuration with fp16 and optimizer_config in place DistOptimizerHook for distributed training.

@HostGuest
Copy link

can u help me about the env plz ? which versions do u use , pytorch cuda, .....
i have errors seting up the env ? i have cuda 11.8 , ubunto 20

@svamsip
Copy link
Author

svamsip commented May 16, 2023

@HostGuest I'm using pytorch 1.9.0; cuda11.1; cudnn8;
for env setup you can follow the steps I've documented here INSTALL.md

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