TensorFlow Developer Specialization NLP Assignment W3

Hello !

I have implemented the function train_val_dataset , it gives me the same output, but when I run the unittests.test_train_val_datasets(train_val_datasets), I get this error :


Please help ! Thank you !

Your error is stating in the grade function train_val_dataset, you are using validation text with a value which is incorrect.

First you create the train size using the length function to the TRAINING_SPLIT, making sure to apply integer function as train_size is expected to be integer value.

You need to make sure to use the train_size correctly to get the validation dataset.

These are the hints given

Hints:

Take a look at the take and skip methods to generate the training and validation data.

The batch method is useful to split the dataset into batches.

So one would require to use the argument dataset and skip method to get the validation dataset and the next step is converting the respective dataset into batched dataset using the BATCH_SIZE

1 Like

Hello @Deepti_Prasad !

The issue was with the TRAINING_SPLIT !!
Thank you for the hint !

2 Likes