0

I am new to ML and python. Not sure if I am doing it correct? my code:

fashion_mnist = keras.datasets.fashion_mnist.load_data()
(x_train,y_train),(x_test,y_test)=keras.datasets.fashion_mnist.load_data()
# x train data from 0 to 2000 and x validation data from 2000 to end
x_train_subset,x_valid = fashion_mnist[:2000],fashion_mnist[2000:]
# ytrain data from 0 to 2000 and yvalidation data from 2000 to end
y_train_subset,y_valid= fashion_mnist[:2000],fashion_mnist[2000:]
# x test from 0 to 500
x_test = fashion_mnist[:500]
# ytest from 0 to 5000
y_test= fashion_mnist[500:]
holaling
  • 25
  • 1
  • 5
  • 1
    Search at google first. https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html – Innat Mar 15 '21 at 12:19
  • 1
    Does this answer your question? [How training and test data is split - Keras on Tensorflow](https://stackoverflow.com/questions/51006505/how-training-and-test-data-is-split-keras-on-tensorflow) – Yevhen Kuzmovych Mar 15 '21 at 12:19
  • Found a similar issue [here](https://stackoverflow.com/questions/48566821/is-there-a-keras-method-to-split-data), this might help you. Thanks! –  Mar 31 '22 at 11:16

0 Answers0