Skip to content

Instantly share code, notes, and snippets.

@StrikingLoo
Created June 23, 2019 23:32
Show Gist options
  • Select an option

  • Save StrikingLoo/e537b031d91b715596db7641b4cdd057 to your computer and use it in GitHub Desktop.

Select an option

Save StrikingLoo/e537b031d91b715596db7641b4cdd057 to your computer and use it in GitHub Desktop.
chars_np = np.asarray(chars)
def output_idx(i):
return np.argmax(model.predict([[X[i]]])[0], 1)
def output_str(i):
return ''.join(list(chars_np[output_idx(i)]))
output_str(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment