Skip to content

Commit

Permalink
Sort characters to always return same mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaka Kravanja committed Aug 21, 2020
1 parent c97efac commit 004b807
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion play_char.ipynb
Expand Up @@ -59,7 +59,7 @@
"class CharDataset(Dataset):\n",
"\n",
" def __init__(self, data, block_size):\n",
" chars = list(set(data))\n",
" chars = sorted(list(set(data)))\n",
" data_size, vocab_size = len(data), len(chars)\n",
" print('data has %d characters, %d unique.' % (data_size, vocab_size))\n",
" \n",
Expand Down

0 comments on commit 004b807

Please sign in to comment.