[mlpack-git] [mlpack] [Proposal]Add a function to visualize the results of sparse_autoencoder (#452)
notifications at github.com
Thu Oct 22 10:02:23 EDT 2015
Hm, so I'm hesitant to include the bilinear interpolation code, since (a) other toolkits could do it faster/better (i.e. save the PGM in the low resolution, then use ImageMagick command-line tools to make it larger for viewing) and (b) this type of visualization is going to be primarily useful for the case of autoencoders applied to images, which is not the only application of autoencoders.
What I do think could be useful though, is this:
* Access to the `parameters` member of `SparseAutoencoder`.
* A function which could, for a given hidden unit (or for all hidden units), return the input that maximally activates the hidden unit. (I think part of your pastebin snippet does this.) So basically I could do something like this:
// Get the input that maximally activates hidden unit 0, storing the result in maximalInput.
arma::mat maximalInput; // Or should that be arma::vec...?
sa.MaximalInput(0 /* for hidden unit 0 */, maximalInput);
Then, if it was an image, you could call `maximalInput.reshape()` to set the size of the input correctly, then you could do bilinear interpolation and/or write it to a file and postprocess from there.
What do you think? This is just a proposal here; I'd like to find a way to use the code you've written, especially if it's useful for you, but I want to figure out the way that it can be maximally useful across all use cases without adding too much complexity to the API.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mlpack-git