如何在MirroredStrategy下为每个塔定义具有不同值的变量

时间:2019-01-13 04:33:36

标签: tensorflow tensorflow-estimator

我尝试使用tf估计器和MirroredStrategy在多GPU上训练模型。我发现模型的变量包装为MirroredVariables,它们在塔之间始终保持同步。

但是,在训练的每个步骤中,每个塔的变量都需要具有不同的值,如何定义该变量?即局部性为T的变量引用(https://www.tensorflow.org/api_docs/python/tf/contrib/distribute/DistributionStrategy

0 个答案:

没有答案