This commit is contained in:
Nick
2019-09-20 13:05:03 -06:00
parent 0680a77442
commit 083f10ffa5
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ class CTRLGenerator():
# Make sure only a possible verb is chosen.
if first_token:
for word in get_possible_verbs():
prompt_logits[_token][self.word2idx[word]] += 0.1
prompt_logits[_token][self.word2idx[word]] *= 1000
first_token = False
# compute probabilities from logits
+2 -2
View File
@@ -90,7 +90,7 @@ first_to_second_mappings = [
(" me", " you"),
(" us ", " you "),
(" us.", " you."),
("our ", "your ")
(" our", " your")
]
second_to_first_mappings = [
@@ -134,7 +134,7 @@ def second_to_first_person(text):
return capitalize_first_letters(text)
possible_verbs = ["go", "run", "open", "look", "walk", "make", "try", "say", "tell", "attack", "use", "turn", "fight", "scream", "yell"]
possible_verbs = ["ask", "go", "run", "open", "look", "walk", "make", "try", "say", "tell", "attack", "use", "turn", "fight", "scream", "yell"]
def get_possible_verbs():
return possible_verbs