Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kentaroy47/pytorch-mgpu-cifar10
testing multi gpu for pytorch
https://github.com/kentaroy47/pytorch-mgpu-cifar10
cifar10 dnn gpu multi-gpu pytorch
Last synced: about 14 hours ago
JSON representation
testing multi gpu for pytorch
- Host: GitHub
- URL: https://github.com/kentaroy47/pytorch-mgpu-cifar10
- Owner: kentaroy47
- Created: 2018-11-28T01:56:42.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-07T08:58:29.000Z (over 5 years ago)
- Last Synced: 2023-03-04T01:41:50.557Z (almost 2 years ago)
- Topics: cifar10, dnn, gpu, multi-gpu, pytorch
- Language: Python
- Homepage: https://qiita.com/arutema47/items/2b92f94c734b0a11609d
- Size: 14.6 KB
- Stars: 23
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Multi-GPU training with Pytorch.
Let's try easy multi-GPU training with pytorch.
Just adding:
```python
if device == 'cuda':
net = torch.nn.DataParallel(net) # make parallel
cudnn.benchmark = True
```
will enable parallel GPU usage in Pytorch! :)Training dataset: CIFAR10
DeepLearningFramework: Pytorch
Should have more than 2GPUs to test it out.
Should scale more than 2 GPUs!
## 詳しい解説と設定など
https://qiita.com/arutema47/items/2b92f94c734b0a11609d## Usage
```shell
git clone https://github.com/kentaroy47/pytorch-mgpu-cifar10.git
cd pytorch-mgpu-cifar10
export CUDA_VISIBLE_DEVICES=0,1 # parallel training with GPUs 0 and 1.python train_cifar10.py
# parallel training with GPUs 0-3.
export CUDA_VISIBLE_DEVICES=0,1,2,3
python train_cifar10.py# デフォルトの設定はResnet18となっています。
# Res101で学習する場合
python train_cifar10.py --net res101# Res50で学習する場合
python train_cifar10.py --net res50
```