'''
from keras.utils import np_utils
import numpy as np
categories = ["L","M","S"]
nb_classes = len(categories)
X_train, X_test, y_train, y_test = np.load("C:", allow_pickle=True)
X_train = X_train.astype("float") / 255.0
X_test = X_test.astype("float") / 255.0
y_train = np_utils.to_categorical(y_train, nb_classes)
y_test = np_utils.to_categorical(y_test, nb_classes)
from keras.utils import np_utils
import numpy as np
categories = ["L","M","S"]
nb_classes = len(categories)
X_train, X_test, y_train, y_test = np.load("C:", allow_pickle=True)
X_train = X_train.astype("float") / 255.0
X_test = X_test.astype("float") / 255.0
y_train = np_utils.to_categorical(y_train, nb_classes)
y_test = np_utils.to_categorical(y_test, nb_classes)
model = model.fit(X_train,
y_train,
epochs=100,
batch_size=6,
validation_data=(X_test,y_test))
model = model.fit(X_train,
y_train,
epochs=100,
batch_size=6,
validation_data=(X_test,y_test))
'''
実行実行すると
ValueError Traceback (most recent call last)
in
----> 1 model = model.fit(X_train,
2 y_train,
3 epochs=100,
4 batch_size=1000,
5 validation_data=(X_test,y_test))
1108
1109 if logs is None:
-> 1110 raise ValueError('Expect x to be a non-empty array or dataset.')
1111 epoch_logs = copy.copy(logs)
1112
ValueError: Expect x to be a non-empty array or dataset.
ValueError Traceback (most recent call last)
<ipython-input-27-0f5758f6f275> in <module>
----> 1 model = model.fit(X_train,
2 y_train,
3 epochs=100,
4 batch_size=1000,
5 validation_data=(X_test,y_test))
1108
1109 if logs is None:
-> 1110 raise ValueError('Expect x to be a non-empty array or dataset.')
1111 epoch_logs = copy.copy(logs)
1112
ValueError: Expect x to be a non-empty array or dataset.