DeepQA icon indicating copy to clipboard operation
DeepQA copied to clipboard

parameter of tf.contrib.legacy_seq2seq.sequence_loss()

Open iamabug opened this issue 7 years ago • 0 comments

I am reading model.py and the following code confuses me (line 197-203):

self.lossFct = tf.contrib.legacy_seq2seq.sequence_loss( decoderOutputs, self.decoderTargets, self.decoderWeights, self.textData.getVocabularySize(), softmax_loss_function= sampledSoftmax if outputProjection else None )

And the definition of the function is:

def sequence_loss(logits, targets, weights, average_across_timesteps=True, average_across_batch=True, softmax_loss_function=None, name=None)

As it goes, self.textData.getVocabularySize() (a scalar number) should be passed to average_across_timesteps. Is it okay here or I misunderstand somewhere?

iamabug avatar Sep 02 '17 02:09 iamabug