{"action":"created","issue":{"url":"https://api.github.com/repos/mlpack/mlpack/issues/451","labels_url":"https://api.github.com/repos/mlpack/mlpack/issues/451/labels{/name}","comments_url":"https://api.github.com/repos/mlpack/mlpack/issues/451/comments","events_url":"https://api.github.com/repos/mlpack/mlpack/issues/451/events","html_url":"https://github.com/mlpack/mlpack/pull/451","id":107450114,"number":451,"title":"improve speed of SparseAutoencoder and make it more flexible","user":{"login":"stereomatchingkiss","id":1801914,"avatar_url":"https://avatars.githubusercontent.com/u/1801914?v=3","gravatar_id":"","url":"https://api.github.com/users/stereomatchingkiss","html_url":"https://github.com/stereomatchingkiss","followers_url":"https://api.github.com/users/stereomatchingkiss/followers","following_url":"https://api.github.com/users/stereomatchingkiss/following{/other_user}","gists_url":"https://api.github.com/users/stereomatchingkiss/gists{/gist_id}","starred_url":"https://api.github.com/users/stereomatchingkiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stereomatchingkiss/subscriptions","organizations_url":"https://api.github.com/users/stereomatchingkiss/orgs","repos_url":"https://api.github.com/users/stereomatchingkiss/repos","events_url":"https://api.github.com/users/stereomatchingkiss/events{/privacy}","received_events_url":"https://api.github.com/users/stereomatchingkiss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-21T06:12:59Z","updated_at":"2015-09-23T04:17:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mlpack/mlpack/pulls/451","html_url":"https://github.com/mlpack/mlpack/pull/451","diff_url":"https://github.com/mlpack/mlpack/pull/451.diff","patch_url":"https://github.com/mlpack/mlpack/pull/451.patch"},"body":"This commit intent to complete two things\r\n\r\n1 : improve the speed of SparseAutoencoder\r\nI cache the computation result in the data member, so the algorithm do not need to compute it two times.Since the member function is const, I declared the data member as mutable;Do anyone think that make the member function as non-const would be better?\r\n\r\n2 : make the SparseAutoencoder more versatile\r\nI add two template parameters as following\r\n\r\ntemplate<typename HiddenLayer, typename OutputLayer>\r\nclass SparseAutoencoderFunction;\r\n\r\nThis allow users use different layer from ann two compute the features"},"comment":{"url":"https://api.github.com/repos/mlpack/mlpack/issues/comments/142486365","html_url":"https://github.com/mlpack/mlpack/pull/451#issuecomment-142486365","issue_url":"https://api.github.com/repos/mlpack/mlpack/issues/451","id":142486365,"user":{"login":"stereomatchingkiss","id":1801914,"avatar_url":"https://avatars.githubusercontent.com/u/1801914?v=3","gravatar_id":"","url":"https://api.github.com/users/stereomatchingkiss","html_url":"https://github.com/stereomatchingkiss","followers_url":"https://api.github.com/users/stereomatchingkiss/followers","following_url":"https://api.github.com/users/stereomatchingkiss/following{/other_user}","gists_url":"https://api.github.com/users/stereomatchingkiss/gists{/gist_id}","starred_url":"https://api.github.com/users/stereomatchingkiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stereomatchingkiss/subscriptions","organizations_url":"https://api.github.com/users/stereomatchingkiss/orgs","repos_url":"https://api.github.com/users/stereomatchingkiss/repos","events_url":"https://api.github.com/users/stereomatchingkiss/events{/privacy}","received_events_url":"https://api.github.com/users/stereomatchingkiss/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T04:17:13Z","updated_at":"2015-09-23T04:17:13Z","body":">can I get a little more information on how you calculated that?\r\nOf course, the file sparse_autoencoder_function already provide the example, I hope this is a correct way to measure the performance\r\n\r\n>This file looks like it's heavily based on the code in mlpack/methods/sparse_autoencoder/sparse_autoencoder_function.hpp\r\nYes, I put it in ann mainly because this class break the old api and SparseAutoEncoder looks looks like part of the family member of neural network(I am not an expert of neural network, please correct me if I am wrong), for backward compatibility I do not change the original version. \r\n\r\n> But maybe it would be a better idea to make this class work with the Trainer class in src/mlpack/methods/ann/\r\nI do not know how to make it work yet, but if this could work, it should be able to provide unified interface. I think I would wait for the comments of zoq's."}}