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
I used numpy.fromfile api to read given data, but got wrong data. code are as follow:
import numpy as np a = np.fromfile('data/train-images-idx3-ubyte', dtype=np.float32) b = np.fromfile('data/train-labels-idx1-ubyte', dtype=np.uint8) l_a = a.shape[0] l_b = b.shape[0] print(f"{l_a // (28*28)} images found") print(f"{l_b} labels found")
and the output is this:
15000 images found 60008 labels found
It seems not all right. What's wrong with this solution and what can I do to run it properly?
The text was updated successfully, but these errors were encountered:
and I unzipped the data by the way
Sorry, something went wrong.
No branches or pull requests
I used numpy.fromfile api to read given data, but got wrong data. code are as follow:
and the output is this:
It seems not all right. What's wrong with this solution and what can I do to run it properly?
The text was updated successfully, but these errors were encountered: