-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeated content #7
Comments
For how long did you train? What was your final KL/NLL Loss? Also with what Also, when looking at it, the samples actually don't look that bad. Certainly, there is a problem with |
Is that seq2seq-like model you want to implement? t = 0
while(t < self.max_sequence_length-1):
if t == 0:
input_sequence = Variable(torch.LongTensor([self.sos_idx] * batch_size), volatile=True)
if torch.cuda.is_available():
input_sequence = input_sequence.cuda()
outputs = outputs.cuda()
input_sequence = input_sequence.unsqueeze(1)
input_embedding = self.embedding(input_sequence) # b * e
output, hidden = self.decoder_rnn(input_embedding, hidden)
logits = self.outputs2vocab(output) # b * v
outputs[:,t,:] = nn.functional.log_softmax(logits, dim=-1).squeeze(1) # b * v
input_sequence = self._sample(logits)
t += 1
outputs = outputs.view(batch_size, self.max_sequence_length, self.embedding.num_embeddings) |
I used your code and trained a model to generate new sentences. The problem is that there are so many repeated tokens in generated samples.
Any insight how to deal with this?
For example, token appears so many times.
https://pastebin.com/caxz43CQ
The text was updated successfully, but these errors were encountered: