tf.estimator.Estimator.evaluate() 在一个 GPU 上总是 运行 吗?

Does tf.estimator.Estimator.evaluate() always run on one GPU?

我的印象是在 tf.estimator.Estimator 实例上调用 evaluate() 而不是 运行 多个 GPU 上的模型,即使分配策略是 MirroredStrategy,配置为至少使用 2 个 GPU。

这是一个建议这种行为的示例脚本:https://gist.github.com/patzm/b69fcdf33fc9062683d749d0ea936b5e

这里是 nvidia-smi 显示此行为的屏幕截图:

如果 evaluate() 应该 运行,如果像上面那样在多个 GPU 上使用,请在您的回答中突出显示我的错误。

在你的RunConfig中,也将策略设置为eval_distribute,详情见this

run_config = tf.estimator.RunConfig(
    model_dir=tf.test.get_temp_dir(),
    session_config=tf.ConfigProto(allow_soft_placement=True),
    train_distribute=distribution_strategy,
    eval_distribute=distribution_strategy
)