Skip to content Skip to sidebar Skip to footer

Loading Jpg Of Different Sizes Into Numpy.array - Valueerror: Found Input Variables With Inconsistent Numbers Of Samples

I have a folder with differently sized jpg images from which I'd like to generate a train and a test set via sklearn.model_selection.train_test_split(). This is my code so far: hel

Solution 1:

x should be a 2-dimensional array of size [no_of_samples, no_of_features]. Do this:

x = np.atleast_2d(x).T

Post a Comment for "Loading Jpg Of Different Sizes Into Numpy.array - Valueerror: Found Input Variables With Inconsistent Numbers Of Samples"