atpaino / deep-text-corrector

Deep learning models trained to correct input errors in short, message-like text
Apache License 2.0
1.23k stars 266 forks source link

sampled_loss() got an unexpected keyword argument 'logits' #18

Open asingh9530 opened 5 years ago

asingh9530 commented 5 years ago

@atpaino This error occured when running text_corrector_models.py

yourSylvia commented 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.