Your actual test labels should be of size 2 because it’s binary classification. Why is it of size 10?
To get your model running, that’s the only thing you need figure out. See why your test labels are of size 10 for a binary classification application.
What is the output of => train_data.classes and test_data.classes?
Alternatively, go into the train/test folders to see how many classes (folders) exist.
My guess is, train folder has 2 subfolders (for 2 classes) while your test folder has 10 subfolders (for 10 classes).