you have done too much editing and addition of codes in places where you weren’t suppose to.
Please get a fresh copy and re-do your assignment. This time make sure only to replace the None place between the markers ###START AND END CODE HERE### and not add any extra code line.
- Issue with train val dataset.
1a.determination of train_size is not by numerical value but use the argument data to the TRAINING_SPLIT(Make sure use the int function as the instructions mentions the number of sentences used in training should be integer.
1b.Next to get slicing for text only and label only you are suppose to use data and mention the position of its relevance in column position and not mention row positioning.
1c. while splitting the sentences and labels into train and val splits, your codes for train splits for text and labels are incorrect as you have mentioned it with it index positioning which was not required.
-
Issues with fit_label encoder
You have added extra code lines than required with def decode labels. -
issue with preprocess data
This grade function had only two codes lines with dataset to be written one for the lambda function for text and label and another code line for the batch size. other codes lines you added are not required.
remember when you use the lambda function with text and label, use their respective function (which you did but in different steps) also you are suppose to create dataset for text and label, and not text_dataset and label_dataset, these two are incorrect code argument.
the simplest way to recall the first dataset code. Use the lambda function to the map function. when you use the lambda function for text, label, mention its respective function. make sure to place the tuples correctly as most of the time missing trailing tuple have also caused error.
Regards
DP