在tensorflow keras model.fit输出中“ batch_all_reduce”是什么意思?

时间:2020-08-27 01:34:36

标签: tensorflow tensorflow2.0

我在tensorflow keras model.fit输出上看到以下消息。该模型使用MirroredStrategy进行2个GPU的分布式处理。有人可以解释以下消息的含义吗? enter image description here

1 个答案:

答案 0 :(得分:0)

import requests from django.http import HttpResponse import json from pyapi.vehicule_approver.models import Vehicle def vehicle_validation(request): ... 意味着在每个训练步骤(批量)中执行全减少操作。

All-reduce是一种用于在分布式训练中的多个设备(GPU)之间进行参数同步的机制。

根据源代码here,8表示模型中batch_all_reduce的数量。然后将这些密集值打包并用于通过全缩减进行参数更新。