Skip to content

Instantly share code, notes, and snippets.

@jamescalam
Created April 1, 2020 17:11
Show Gist options
  • Save jamescalam/b51067dbc8ea3121dcbbf4b98cad1fec to your computer and use it in GitHub Desktop.
Save jamescalam/b51067dbc8ea3121dcbbf4b98cad1fec to your computer and use it in GitHub Desktop.
Snippet showing how to split data for sequence prediction.
def split_input_output(chunk):
return chunk[:-1], chunk[1:]
dataset = sequences.map(split_input_output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment