This commit is contained in:
Nick
2019-10-29 09:23:10 -06:00
parent b171c5b505
commit c9a65db512
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ def loss(labels, logits):
class CTRLGenerator():
def __init__(self, control_code="Writing Text:", generate_num=60, temperature=0.5, topk=40, nucleus_prob=0):
def __init__(self, control_code="Writing Text:", generate_num=45, temperature=0.5, topk=40, nucleus_prob=0):
self.generate_num=generate_num
model_dir = "generator/ctrl/training_utils/seqlen256_v1.ckpt/"
+1 -1
View File
@@ -7,7 +7,7 @@ prompts:
vague_police: "You are a police officer. You get to work and "
apocalypse: "You walk for two hours and take a break. You've left the town you were in and are now in a more rural area. There's a building to your right and you see"
apocalypse: "You walk for two hours and take a break. You've left the town you were in and are now in a more rural area. There's a building to your right and you see "
action_verbs:
classic: ["You attack", "You tell", "You use", "You go"]
+1 -1
View File
@@ -42,7 +42,7 @@ class Story():
def latest_result(self):
if len(self.results) >= 2:
return self.context + self.results[-1] + self.actions[-1] + self.results[-1]
return self.context + self.results[-2] + self.actions[-1] + self.results[-1]
elif len(self.results) >= 1:
return self.context + self.actions[-1] + self.results[-1]
else: