keras multi gpu 分布式训练

可以参考mask rcnn的例子

一个简单的例子: 点击打开链接

还有一个教程:Keras同时用多张显卡训练网络  点击打开链接

''' 根据官方文档
    To save the multi-gpu model, use .save(fname) or .save_weights(fname) with the template model (the argument you
    passed to multi_gpu_model), rather than the model returned by multi_gpu_model.
    或者:自己制定回调函数保存: https://www.jianshu.com/p/db0ba022936f
    或者:modelGPU.__setattr__('callback_model',modelCPU)
     #now we can train as normal and the weights saving in our callbacks will be done by the CPU model
     modelGPU.fit_generator( . . .   https://github.com/keras-team/keras/issues/8123
    '''

以及官方博客:https://keras.io/utils/#multi_gpu_model

如何对keras模型的每一层设置不同的学习率,以及设置不同的偏置的学习率(一般偏置学习率是权值学习率的两倍) 点击打开链接 

5 tips for multi-GPU training with Keras 点击打开链接

 

Maxing Multiple GPUs of Different Speeds with Keras and TensorFlow 点击打开链接

 

[知乎上的理论分析]如何理解深度学习分布式训练中的large batch size与learning rate的关系? 点击打开链接

 

多GPU训练学习率的调节:点击打开链接

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值