We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I sample the model with command:
python visualize.py -seq_length 1000 -cuda -load_model mlstm_ns.pt -temperature 0.4 -neuron 2388 -init "I couldn't figure out"
and the process returned an error:
does the code can't run on python-2.7 or other problem?
thanks a lot.
The text was updated successfully, but these errors were encountered:
The code was written in python 3.5 and I suspect the problem comes from the differences in string handling between python 2.7 and 3.5
Sorry, something went wrong.
@Damonhaus To use in Python 2, change the batchify function for this:
def batchify(data, bsz): ids = torch.LongTensor([ord(char) for char in data.encode()]) nbatch = ids.size(0) // bsz ids = ids.narrow(0, 0, nbatch * bsz) ids = ids.view(bsz, -1).t().contiguous() return ids
No branches or pull requests
When I sample the model with command:
python visualize.py -seq_length 1000 -cuda -load_model mlstm_ns.pt -temperature 0.4 -neuron 2388 -init "I couldn't figure out"
and the process returned an error:
does the code can't run on python-2.7 or other problem?
thanks a lot.
The text was updated successfully, but these errors were encountered: