Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

Worker distribution in matlab code

1 view (last 30 days)
AKHILA GOUDA
AKHILA GOUDA on 30 May 2020
Closed: MATLAB Answer Bot on 20 Aug 2021
I want to run 10 neural network at time but in case of serial coding it will take long time to get execute.
So i want to distribute these 10 neural networks to different workers so that all these 10 nn will able to run simultaneously.
so how can i do that.
  2 Comments
Walter Roberson
Walter Roberson on 30 May 2020
parfor()
I would suggest creating the nets on the appropriate worker, such as load() from a file.
John D'Errico
John D'Errico on 30 May 2020
Recognize you may not get anything close to a 10-1 speedup.
If you have multiple cores available to MATLAB, then on large problems MATLAB is often able to multi-thread some partns of your problem. That may mean you could already be using all of those cores, at least some of the time. And if this is something that is taking a great amount of time to solve, then the odds are good the problem would fall into the set of large problems.
If that is so, then when you split each problem apart, then force a single core to solve the problem, it will run more slowly, because the automatic multi-threading will no longer be available. The other cores are already being consumed by their own threads.
All of this very much depnds on the tools. Lacking the NN toolbox, I cannot know if MATLAB already is able to perform at least some multi-threading. But you will need to check that. If you find that MATLAB already runs all available cores flat out when building one large neural net, then building 10 neural nets at once on 10 cores will give you no speed bump at all.
So first look at the CPU loading for one neural net.

Answers (0)

This question is closed.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!