2011/11/4 Andreas Müller <[email protected]>: > On 11/04/2011 02:49 PM, Olivier Grisel wrote: >> 2011/11/4 Andreas Müller <[email protected]>: >>> Hi everybody. >>> I was thinking about putting some work into making a multi layer >>> perceptron implementation >>> for sklearn. I think it would be a good addition to the other, mostly >>> linear, classifiers >>> in sklearn. Together with the decision trees / boosting that many people >>> are working >>> on at the moment, I think sklearn would cover most of the classifiers >>> used today >>> My question is: has anyone started with a mlp implementation yet? Or is >>> there any >>> code lying around that people think is already pretty good? >>> I would try to keep it simple with support only for one hidden layer and do >>> a pure python implementation to start with. >> In the past (before getting involved in scikit-learn) I had started an >> unfinished library in pure C + python ctypes bindings for MLP and >> stacked autoencoders. This is basically the same datastructure and >> algorithms but one is supervised and the other is unsupervised. >> >> https://bitbucket.org/ogrisel/libsgd/wiki/Home >> >> I think it should be pretty straightforward to rewrite this in cython >> directly. The important trick is to pre-allocate the memory buffer of >> the minibatch size for both the hidden and output layers. >> > Why not wrap your C in cython? Then we could take advantage > of your SSE code.
The code would be much simpler in cython (I did not know about cython at that time). Also we don't want SSE-specific code in scikit learn to keep it portable and easy to install. Debugging SSE related segmentation fauls (because of memory alignment issues for instance) can be very tricky and that is a huge maintenance burden. People who want efficient vectorized code should use pylearn and theano instead. -- Olivier http://twitter.com/ogrisel - http://github.com/ogrisel ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
