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

About the args.batch_size_val #9

Closed
sunpeng1996 opened this issue Jul 23, 2019 · 3 comments
Closed

About the args.batch_size_val #9

sunpeng1996 opened this issue Jul 23, 2019 · 3 comments

Comments

@sunpeng1996
Copy link

Hi, hs.
In your code,

if args.distributed: torch.cuda.set_device(gpu) args.batch_size = int(args.batch_size / ngpus_per_node) args.batch_size_val = int(args.batch_size_val / ngpus_per_node) args.workers = int(args.workers / ngpus_per_node)

I think the default batch_size_val should be as the same as the ngpus_per_node, or get an error:
ValueError: batch_size should be a positive integeral value, but got batch_size=0

@sunpeng1996
Copy link
Author

Hi, hengshuang:
why input size in pspnet must be 8*n+1?

@sunpeng1996
Copy link
Author

And why use Apex? Is it better than original pytorch-distributed??

@hszhao
Copy link
Owner

hszhao commented Sep 9, 2019

  1. Thanks for the issue. I updated the default value of batch_size_val in the config files.
  2. We follow the previous DeepLab in Caffe where the crop size need to be 8*n+1 (this is due to the implementation of the interp' layer that needs to do align corners). 8*n is also fine now in PyTorch interpolate' function.
  3. At the time of the development of this repo, sync bn is not included in the official PyTorch. You can use PyTorch 1.1 or newer versions with sync bn incorporated.

@hszhao hszhao closed this as completed Sep 9, 2019
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