You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm training a CNN and it looks like the program reads my dataset properly.
i = 0
for f, breed in tqdm(df_train.values):
if type(cv2.imread('train_{}.jpeg'.format(f)))==type(None):
continue
else:
img = cv2.imread('train_{}.jpeg'.format(f))
label = one_hot_labels[i]
x_train.append(cv2.resize(img, (im_size1, im_size2)))
y_train.append(label)
i += 1
np.save('x_train2',x_train)
np.save('y_train2',y_train)
print('Done')
I then get the output which appended 35,126 images 100%|█████████████████████████████████████████████████████████████████████████| 35126/35126 [00:01<00:00, 25629.80it/s] Done
I then change the x_train and y_train to
I get the error ValueError: With n_samples=0, test_size=0.1 and train_size=0.9, the resulting train set will be empty. Adjust any of the aforementioned parameters.
Is it because I didn't append the dataset properly? Or did I not convert the images into tensors? If so, what would be the proper way to convert them into tensors?
The text was updated successfully, but these errors were encountered:
could it be that not converting the image to grayscale be one of the reasons why it doesn't append properly? I don't have a function in my code which converts the image to grayscale.
I'm training a CNN and it looks like the program reads my dataset properly.
I then get the output which appended 35,126 images
100%|█████████████████████████████████████████████████████████████████████████| 35126/35126 [00:01<00:00, 25629.80it/s] Done
I then change the x_train and y_train to
But when printing the shape it returns 0.
(0,) (0,)
Finally, when I try to split the dataset by calling this numpy...
I get the error
ValueError: With n_samples=0, test_size=0.1 and train_size=0.9, the resulting train set will be empty. Adjust any of the aforementioned parameters.
Is it because I didn't append the dataset properly? Or did I not convert the images into tensors? If so, what would be the proper way to convert them into tensors?
The text was updated successfully, but these errors were encountered: