Skip to content

Commit

Permalink
Explicitly set prefix to None if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
minimaxir committed Jun 16, 2019
1 parent ae3436d commit e715c8d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gpt_2_simple/gpt_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,9 @@ def generate(sess,
if nsamples == 1:
sample_delim = ''

if prefix == '':
prefix = None

if prefix:
context = tf.placeholder(tf.int32, [batch_size, None])

Expand Down

0 comments on commit e715c8d

Please sign in to comment.