【问题标题】:Trouble understanding tf.contrib.seq2seq.TrainingHelper无法理解 tf.contrib.seq2seq.TrainingHelper
【发布时间】:2017-10-05 05:23:26
【问题描述】:

我在 1.1 版本中使用 tf.contrib.seq2seq 类在 tensorflow 中构建了一个sequence to sequence 模型。

要知道我使用 TrainingHelper 来训练我的模型。 但是这个助手是在解码器中提供以前解码的值用于训练还是仅仅提供基本事实? 如果不是,我如何将以前解码的值作为解码器的输入而不是地面真值提供?

【问题讨论】:

    标签: tensorflow recurrent-neural-network decoder sequence-to-sequence


    【解决方案1】:

    TrainingHelper 在每一步都提供基本事实。如果您想使用解码器输出,您可以使用定时采样 [1]。计划采样在ScheduledEmbeddingTrainingHelperScheduledOutputTrainingHelper 中实现,因此您可以使用两者之一(取决于您的特定应用程序)而不是TrainingHelper。另请参阅此处的此线程: scheduled sampling in Tensorflow

    [1]https://arxiv.org/pdf/1506.03099.pdf

    【讨论】:

      猜你喜欢
      • 2016-02-10
      • 2014-01-03
      • 2020-04-17
      • 2020-08-26
      • 2011-04-12
      • 2020-02-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多