Why is my MATLAB Neural Network working slower in parallel processing?

If I use the function:

net=feedfowardnet([60 60])

net2=train(net,x,t)

It takes about 20 minutes to train. (I did this on several computers {with the same specifications}, and the average time is always about 20 minutes)

If I use the function:

parpool  %//starts a local parallel pool connected to 2 workers
net2=train(net,x,t,'useParallel','yes')

It takes about 40 minutes to complete the training. I have two cores, so this counter is intuitive, it should be twice as fast, and not twice as slow. I use the same starting network, and the same training inputs and tasks.

In addition, when I open the task manager during NN training, it shows that both processors are 100% working, even when parpoolthey are useParallelturned off.

- Mathworks , "Parallel Computing Toolbox ™ Neural Network Toolbox ™ . backpropagation, ".

2000 . 32 3 , . , net2=train(net,x,t).

parpool , ( parfor), . , .

?

Intel Core 2 Duo E8400 Cpu @3GHz, MATLAB R2013 b. ( ). , .


. . , , , . , - , . matlab , :

load('H:\18-03-14\x.mat')
load('H:\18-03-14\net.mat')
load('H:\18-03-14\t.mat')

H: - . , matlab, . ?

+4
2

parallelism: . MATLAB , .

Parallel Computing Toolbox . . -, MATLAB . , , . , . .

. 10 , 2000.

, 60 - , , , . 2000 * 3 = 6000 . 32 * 60 + 60 * 60 + 60 * 3 32 + 60 + 3 5795 , , . , , . , , , .

, feedforwardnet (100), , .

, Neural Network Toolbox 68308 :

[x,t] = vinyl_dataset;
net = feedforwardnet(140,'trainscg');
rng(0), tic, net2 = train(net,x,t); toc
parpool
rng(0), tic, net2 = train(net,x,t,'useParallel','yes'); toc
+4

100% - , train . .

+4

Source: https://habr.com/ru/post/1532527/


All Articles