Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobby233Liu committed Apr 5, 2021
2 parents afe38c4 + d529426 commit 238a906
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gpt_2_simple/gpt_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def generate_samples():
maketree(os.path.join(SAMPLE_DIR, run_name))
with open(
os.path.join(SAMPLE_DIR, run_name,
'samples-{}').format(counter), 'w') as fp:
'samples-{}').format(counter), 'w', encoding='utf-8') as fp:
fp.write('\n'.join(all_text))

def sample_batch():
Expand Down Expand Up @@ -465,7 +465,7 @@ def generate(sess,
)[:, 1:]

if destination_path:
f = open(destination_path, 'w')
f = open(destination_path, 'w', encoding='utf-8')
generated = 0
gen_texts = []
while generated < nsamples:
Expand Down

0 comments on commit 238a906

Please sign in to comment.