You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
Yes you can do that but it will complete your sentence in Shakespeare style.
The starting character is in:
x = my_txtutils.convert_from_alphabet(ord("L"))
y=x
If you want to start from a sentence instead of a character, you will have to change these lines in the inference loop too:
c = my_txtutils.sample_from_probabilities(yo, topn=2)
y = np.array([[c]]) # shape [BATCHSIZE, SEQLEN] with BATCHSIZE=1 and SEQLEN=1
If you look at the code you will see the "y" is both the output char of the current iteration and is used as the input char to the RNN for the next iteration. In your case, you would use characters from your seed sentence as inputs into the RNN and switch back to the normal behaviour when your seed sentence is exhausted.
I am hoping to use this in an application where the algorithm completes a sentence for you. Where in rnn_play.py is the seed text given?
The text was updated successfully, but these errors were encountered: