arnavmiranda/Linear-Algebraic-Approaches-to-Image-Classification ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python project that trains a small 2 layer CNN on MNIST, then takes the learned conv weights and breaks them down with SVD so I can actually see what the model learned.

I want the app to train the network, save the weights, and then run a full analysis pass that shows the singular values, low rank reconstructions, and a check that the weights really match U, sigma, and V transpose exactly. It should also have a version of the forward pass written in those SVD coordinates, and verify that it gives the same output as the normal CNN.

Please generate the plots too, like the learned filters, eigenfilters, energy spectrum, ReLU regions, and figures that connect the singular vectors back to real MNIST digit patches. If you need to look up current docs online for anything, do that.

I want one main script that can run the whole pipeline end to end, but it should also be possible to skip training and reuse saved weights.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab