sampled_loss() got an unexpected keyword argument 'logits'
asingh9530 opened this issue · 1 comments
asingh9530 commented
@atpaino This error occured when running text_corrector_models.py
yourSylvia commented
I met the same problem.
Change the sample_loss function to:
def sampled_loss(labels, logits):
labels = tf.reshape(labels, [-1, 1])
return tf.nn.sampled_softmax_loss(w_t, b, labels, logits,
num_samples,
self.target_vocab_size)
And that will work.