Comments (6)
This repo uses pytorch-lightning as the trainer. It's convenient to do single-gpu or multi-gpu training by simply setting the gpu number:
python train.py --root /path/to/dataset_root/ --embed_dim 128 --gpus #YOUR_GPU_NUM
If I remember correctly, by default this will use Pytorch DDP Spawn strategy for multi-gpu training. If you want to use Pytorch DDP instead (which should be faster than DDP Spawn in general), you can add one line to train.py:
parser.add_argument('--strategy', type=str, default='ddp')
Let me know if it works.
from hivt.
@yumianhuli2 To reproduce the results in the paper when using multi-gpu training, please also make sure that the effective batch size (batch_size * gpu_num) is 32. For example, if you use 4 gpus, then the batch size per gpu should be 8:
python train.py --root /path/to/dataset_root/ --embed_dim 128 --gpus 4 --train_batch_size 8
from hivt.
Thank you!
from hivt.
Thank you for your outstanding work!If the batchsize is changed, does the learning rate need to be adjusted accordingly?
from hivt.
@tandangzuoren I believe the learning rate should be adjusted. The number of epochs may also need to be changed.
from hivt.
@ZikangZhou Thank you for your advice on this. May I know why 32 is the effective batch size?
from hivt.
Related Issues (20)
- Question: where do you make the scene centered at separate agents in code? HOT 4
- A question about AAEncoder HOT 1
- Qualitative Results Visualization HOT 5
- Test set performance HOT 17
- What do "semantic attributes" represent? HOT 1
- torch.load bottleneck? HOT 1
- Prediction Results for non-agent objects HOT 6
- Code for Qualitative Results analysis HOT 1
- About the loss: reg loss and cls loss HOT 3
- How to obtain the ADE/FDE/MR result of test set? HOT 4
- About no requirements.txt HOT 1
- Code Question HOT 1
- 评价指标报错 HOT 5
- about how to generate test result HOT 2
- The meaning about bos_mask HOT 1
- Bit-wise NOT operation "~" for padding_mask in data.
- What does 'parallel' in args mean?
- HiVT map-free customization HOT 1
- "solving environment killed" while "conda install pytorch-lightning==1.5.2 -c conda-forge"
- cuda and torch version violate
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hivt.