Skip to content

Commit cdf74f3

Browse files
committed
Bring back the source comment
1 parent ed47caf commit cdf74f3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

builder.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ def __init__(self, block_model, position_model, lookback, seed_data, pattern_dat
3030
def random_start_block():
3131
return (bl.START_LINE_BLOCK, 0, 0, 0, random.randrange(0, 4))
3232

33+
# Source:
34+
# https://github.com/keras-team/keras/blob/master/examples/lstm_text_generation.py#L66
35+
# Helper function to sample an index from a probability array
3336
def sample(self, preds):
34-
# helper function to sample an index from a probability array
3537
preds = np.asarray(preds).astype('float64')
3638
preds = np.log(preds) / self.temperature
3739
exp_preds = np.exp(preds)

0 commit comments

Comments
 (0)