Course 2 week 3 Assignment Haven't graded successfully

Hello @Viraj_Hemantha,

According to your latest DM shared, your error is because of

Prepare train dataset by using preprocessing with map_fn, shuffling and batching
def prepare_dataset(train_examples, validation_examples, test_examples, num_examples, map_fn, batch_size):

START CODE HERE

train_ds = YOUR CODE IS INCORRECT PLACED

HOW TO RECTIFY THE CODE:
As in the instruction given above the grader cell mentions first to Shuffle the training data using .shuffle(buffer_size=) and set the buffer size to the number of examples
Then Group these into batches using .batch() and set the batch size given by the parameter.
HERE YOU HAVE PLACED THE ABOVE TWO INSTRUCTIONS IN REVERSE IN YOUR CODE.

Another mistake in your codes is your buffer_size is incorrect, if you read instruction above it mentions buffer_size being number of examples and not len of train examples.

Also when you wrote the codes I noticed it written as
train_ds=
(YOUR CODES STARTS FROM THE NEXT LINE, I SUPPOSE BY MISTAKE YOU HAVE PRESSED AN ENTER HERE). MAKE SURE YOU HAVE PLACED YOUR CODES CORRECTLY.

In case after correctly the above code still gives you an error, make sure you have not done any editing in other cells other than mentioned to write your codes.

If you are unsure, I would suggest you to save a copy of the assignment you did. Then re-do the assignment with a fresh copy by referring at your copy of the assignment you did, so you know where things might have gone wrong.

Also please follow community guidelines for the below

Let me know if you are still stuck.

Keep Learning!!!

Regards
DP