Open asingh9530 opened 5 years ago
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.
@atpaino This error occured when running text_corrector_models.py