Open ThomJ130 opened 2 weeks ago
I am not going to fix this right away, I have other tests I am more interested in than image classifiers. So, keep in mind that the max dimensionality for Windows is somewhere around ~300-350, which is between 750kB-1MB of memory for these matrices.
When dealing with high dimensions, vectors grow linearly and matrices grow quadratically. When exploring a 28x28 pixel image classifier, I ran into a stack overflow error while measuring the diameter of a class's envelope. This was caused by creating an identity matrix on the stack instead of the heap, which came out to be
8 * (28*28)^2 bytes
, or~5MB
of stack allocated memory. A simple fix is to use a dynamically allocated matrix (DMatrix) instead of a statically allocated OMatrix.Refactor:
src\explorers\mesh_explorer.rs
, MeshExplorer::new, basis_vectorssrc\metrics\mod.rs
, find_diameter, basis_vectorssrc\structs\mod.rs
, Span::get_rotater, identity | Note: return type as well