tensorflow 单机多卡 官方cifar10例程

 

测试了官方历程,看没有问题,加上时间紧任务重,就不深究了。

官方tutorials:https://www.tensorflow.org/tutorials/images/deep_cnn

github源码:https://github.com/tensorflow/models/tree/master/tutorials/image/cifar10

值得注意的是:

  • 运行多GPU训练的脚本:
    python cifar10_multi_gpu_train.py --num_gpus = 1 --batch_size=4096
  • 在有4个1080TI的服务器上 运行如下shell命令,后者速度明显提升。
    python cifar10_multi_gpu_train.py --num_gpus=1 --max_steps=100  --batch_size=4096
    python cifar10_multi_gpu_train.py --num_gpus=2 --max_steps=100  --batch_size=2048
    python cifar10_multi_gpu_train.py --num_gpus=3 --max_steps=100  --batch_size=1024
    python cifar10_multi_gpu_train.py --num_gpus=4 --max_steps=100  --batch_size=512

    结果为:

    num_gpus batch_size min msec/batch
    1 4096 256
    2 2048 64
    3 1024 29
    4 512 15

 

posted @ 2018-12-12 13:42  xbit  阅读(435)  评论(0编辑  收藏  举报