mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-09-09 11:13:26 +08:00
update
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user