C3W1 Assignment 1: Deep N-grams Exercise 2 - create_batch_dataset() function

Hi there…I am having trouble coming up with the code to generate the ‘dataset_xy’ in exercise 2. I do know that I need to start with data_generator.map(…) and use the ‘split_input_target()’ function but everything I’ve tried generates an error. Can anyone please provide me with some direction? Thanks in advance…

The generate dataset_xy does involve the does involve the steps you mention, after that you have to shuffle batch and prefetch it. But make sure the steps above these are done properly and the instructions provided are inclusive to it.

I figured it out…thanks.

1 Like