Search code examples
scikit-learnparallel-processingneural-networkjoblib

Sklearn neural network with maximum number of cores available?


I want to use MLPRegressor from sklearn with all 12 cores available to me, however I do not see any option to select the amount of cores (such as with RandomForestClassifier which has the option with n_jobs).

Is there another way to make sure it uses all 12 cores? I vaguely heard about joblib, but how would I use it correctly?


Solution

  • MLPRegressor does not contain any multithreading per se, though the matrix operations will be vectorized and parallelized via numpy.

    You may be able to get better performance by varying your batch size, but if performance is critical you should use a deep learning library like Tensorflow.