@Deepti_Prasad
Thanks, I converted the dataset sentences to sequences and encoded the text labels in a single step.
But I found that the label and text were reversed (the shape wasn’t as expected), so I corrected it. However, something strange is happening—there’s an error in one cell, but the test is still passing.
I will show you from " Exercise 3: fit_label_encoder" step :
if you have done dataset step in 1 step and still it is throwing error, then one has to go back to previous exercise where you have passed test, you can DM screenshot of the codes.
@Deepti_Prasad
I’m sorry, can you explain this part " issue is you mention that extra label, text after lambda(you don’t require to mention label and text and again use the function recall to text and labels".
your dataset codes are right, I mixed with other learner’s post query.
but in the fit_label encoder for code line
join the two label datasets
You used incorrect function to concatenate the training and validation labels.
you were suppose to use train_labels argument to concatenate to validation_labels and tf.data.Dataset, that multiplied the number of dataset in your case which was more than what was required, hence threw that error.