We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSError: [Errno 22] Invalid argument: 'my_mnist.data' Does anyone know how to fix this error?
The text was updated successfully, but these errors were encountered:
This is the code that worked for me:
filename="my_mnist.data" m, n = X_train.shape # Make sure you have loaded MNIST dataset, for loading refer the code snippet below X_mm = np.memmap(filename, dtype='float32', mode="write", shape=(m, n)) X_mm[:] = X_train del X_mm X_mm = np.memmap(filename, dtype='float32', mode="readonly", shape=(m, n)) batch_size = m // n_batches inc_pca = IncrementalPCA(n_components=154, batch_size=batch_size) inc_pca.fit(X_mm)
# Fetching MNIST data from sklearn.datasets import fetch_openml from sklearn.model_selection import train_test_split mnist = fetch_openml('mnist_784', version=1, as_frame=False) mnist.target = mnist.target.astype(np.uint8) X = mnist["data"] y = mnist["target"] X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
Sorry, something went wrong.
No branches or pull requests
OSError: [Errno 22] Invalid argument: 'my_mnist.data'
Does anyone know how to fix this error?
The text was updated successfully, but these errors were encountered: