def get_data(self):
(X_train, y_train), (X_test, y_test) = self.load_data()
idx_perm = np.random.RandomState(101).permutation(X_train.shape[0])
X_train, y_train = X_train[idx_perm], y_train[idx_perm]
X_train = X_train.astype('float32')
X_test = X_test.astype('float32')
print('X_train shape:', X_train.shape)
print(X_train.shape[0], 'train samples')
print(X_test.shape[0], 'test samples')
return X_train, X_test, y_train, y_test
# custom losses for the CNN
评论列表
文章目录