Info

此问题已关闭。 请重新打开它进行编辑或回答。

Worker distribution in matlab code

1 次查看(过去 30 天)
AKHILA GOUDA
AKHILA GOUDA 2020-5-30
关闭: MATLAB Answer Bot 2021-8-20
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 个评论
Walter Roberson
Walter Roberson 2020-5-30
parfor()
I would suggest creating the nets on the appropriate worker, such as load() from a file.
John D'Errico
John D'Errico 2020-5-30
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.

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by