![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
keras
hungita
这个作者很懒,什么都没留下…
展开
-
tensorflow V1版本测试代码
```python import tensorflow as tf with tf.device('/cpu:0'): a = tf.constant([1.0, 2.0, 3.0], shape=[3], name='a') b = tf.constant([1.0, 2.0, 3.0], shape=[3], name='b') with tf.device('/gpu:0'): c = a + b # 注意:allow_soft_placement=True表明:计算设备.原创 2021-03-28 22:19:14 · 432 阅读 · 0 评论 -
keras 多主机分布式训练,mnist为例
keras 多主机分布式训练,mnist为例 1.概述 由于一般GPU的显存只有11G左右,(土豪误入),采用多主机分布式训练是非常有必要的;折腾了几天,按照谷歌的教程,终于搞清楚了,给大家梳理一下: 参考:https://tensorflow.google.cn/tutorials/distribute/multi_worker_with_keras?hl=be 2.配置 首先,设置 TensorFlow 和必要的导入。 import os from tensorflow import keras #t原创 2020-08-11 11:19:29 · 842 阅读 · 10 评论