refactored

This commit is contained in:
Nick
2019-09-26 10:17:39 -06:00
parent 8fe1cc393e
commit 208dd66808
+1 -1
View File
@@ -323,7 +323,7 @@ class CTRLGenerator():
if self.idx2word[idx] is "\n":
num_new_lines += 1
#print("Generated token is ", repr(self.idx2word[idx]))
print(self.idx2word[idx], end=" ")
tokens_generated_so_far = ' '.join([self.idx2word[c] for c in tokens_generated[0][len(text):].squeeze()[:token + 2]])
tokens_generated_so_far = re.sub('(@@ )', '', string=tokens_generated_so_far)