Assertion the result not match C3W1 assignment fn create batch dataset

I do follow the all instruction of create batch dataset but result still not match.

Hi @skinx.learning

Go through the below thread, to find the solution for your issue

Notice first I had an assertion error and then I had the same output as you got, which was because of buffer size.

Regards
DP

I confused a bit, so I need to shuffle data generator right ? What is the first parameter that he means ? Is that ids_dataset ?

Hello @skinx.learning

yes that part of the code is not clearly mentioned because of which I was stuck. But also look at the buffer size.

Yes he meant dataset. He was giving me hints of debugging. if that comment is confusing you, refer the below link which mentions each steps clearly.

You can check the debugging step-wise as per instructions given

Your issue is with the point 5.
Let me know if you still have got doubt.

Regards
DP

I do the following explanation already but I am confusing that my output is stack together. What did i do wrong ?
Screenshot 2567-04-30 at 01.36.47

Hello @skinx.learning

Two corrections required.

  1. first correction in GRADED FUNCTION: line_to_tensor
    Below code line is recalled incorrectly
    Split the input line into individual characters

Kindly use this image to make the correction

  1. Second error the way shuffling is recalled by you is incorrect, please refer the below link to make the correction

#Assemble the final dataset with shuffling, batching, and prefetching

https://www.tensorflow.org/api_docs/python/tf/data/Dataset#shuffle

Make sure you assign the value to the buffer size assigned as 10000 and use reshuffle_each_iteration as true

Regards
DP

1 Like

Problem Solved! Appreciated for your information.

1 Like