char-rnn.pytorch
char-rnn.pytorch copied to clipboard
Refactor to allow for non-ASCII data
This modifies the read_file
method to extract the character vocabulary from the input file, which is then passed as an argument to the generate
and char_tensor
methods.
This also modifies the output file format to include the vocabulary. generate.py
will parse this format by default, but fall back to string.printable
if it's unable to read a vocabulary.