Borrar filtros
Borrar filtros

How to only use 2 of my 4 cores (intel i5) to train neural network?

1 visualización (últimos 30 días)
Jay Cheng
Jay Cheng el 27 de Jul. de 2015
Respondida: Edric Ellis el 28 de Jul. de 2015
I tried following codes to train NN. But instead of using 2 cores, the train() still uses 4 cores because I can see all of my 4 cores are running high in the Windows 7 task manager. How do I use only two cores to train NN? So that I can use the rest of two cores to do something else?
%%%%%%%%%%%%Code starts
N=2;
myCluster=parcluster('local'); myCluster.NumWorkers=N; parpool(myCluster,N)
net2 = train(net1,x,t,'useParallel','yes','showResources','yes');
y = net2(x,'useParallel','yes','showResources','yes');

Respuestas (1)

Edric Ellis
Edric Ellis el 28 de Jul. de 2015
I tried the following:
N=2;
myCluster=parcluster('local');
myCluster.NumWorkers=N;
parpool(myCluster,N)
[x,t] = vinyl_dataset;
net = fitnet(140,'trainscg');
net2 = train(net,x,t,'useParallel','yes','showResources','yes');
and did not see any excessive CPU usage - the two MATLAB workers each used a single CPU. (I tried in R2015a on both Windows and Linux)...

Categorías

Más información sobre Parallel and Cloud en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by