-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
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
assignment1 k_nearest_neighbor.py memory overflow #3
Comments
This is another way, we dont need to use np.tile. Just remove the line, and the code still workable. |
The original code is wrong:
But only remove the line
What we need to do is to transpose
|
in function compute_distances_no_loops(self, X)
the code
F = np.tile(F,(500,5000))
will make a matrix which contain 500 * 5000 * 5000 elements
may be the code should be modified like
The text was updated successfully, but these errors were encountered: