Created
April 1, 2020 17:11
-
-
Save jamescalam/b51067dbc8ea3121dcbbf4b98cad1fec to your computer and use it in GitHub Desktop.
Snippet showing how to split data for sequence prediction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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