self_supervised
self_supervised copied to clipboard
Is it possible to train on multi GPUs?
Is it possible to train the model with multi GPUs? It looks can't work with learn.distrib_ctx():
Could you provide more context about your training script? A link to the script with library versions and the expected error message would be helpful for debugging.
@robeson1010 . The following steps helped me to train model with multi GPU support.
- Try to import
from fastai.distributed import *
- Add the following lines at the end of the code
with learn.distrib_ctx(sync_bn=False):
learn.fit_flat_cos(100, 3e-4)
- Copy all the copy and paste them in a python script file (i.e. scriptname.py )
- Run the file using following command
python -m fastai.launch scriptname.py