-
Notifications
You must be signed in to change notification settings - Fork 30
Description
hello Sir, thanks for providing such a complete project. But there are 2 questions for my running, the first one is that when you load the training data, if you just use
def load_data(): path = '/home/tz/data_analysis/cat-vs-dog/train/' files = os.listdir(path) images = [] labels = [] for f in files: img_path= path + f img = pil_image.open(img_path) img = img.resize((128, 128)) img_array = np.asarray(img)/255 images.append(img_array)
actually you can't read any image just use path "/home/tz/data_analysis/cat-vs-dog/train/cat", you should add the complete path such as "/home/tz/data_analysis/cat-vs-dog/train/cat.1.jpg";
the second question is the function ' train_test_split()', when I use your code, I found an error "ValueError: Found input variables with inconsistent numbers of samples: [25000, 2]", I can't find a solution, could you please give me a hand? thank you so much!