This commit is contained in:
Nick Walton
2019-11-18 17:56:21 -07:00
parent 7dbc3181a4
commit 90d950dc0d
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ def play_unconstrained():
action = remove_profanity(action)
# action = first_to_second_person(action)
result = story_manager.act(action)
result = "\n" + story_manager.act(action)
if player_died(result):
console_print(result + "\nGAME OVER")
break
+3 -3
View File
@@ -7,7 +7,7 @@ from generator.gpt2.src import sample, encoder, model
import json
import numpy as np
tf.logging.set_verbosity(tf.logging.ERROR)
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)
class GPT2Generator:
@@ -36,8 +36,8 @@ class GPT2Generator:
self.sess = tf.compat.v1.Session(config=config)
self.context = tf.placeholder(tf.int32, [self.batch_size, None])
np.random.seed(seed)
tf.set_random_seed(seed)
#np.random.seed(seed)
# tf.set_random_seed(seed)
self.output = sample.sample_sequence(
hparams=hparams, length=self.generate_num,
context=self.context,