Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: GPU and Neural Network ... is this operation legitimate?
Replies: 3   Last Post: Nov 20, 2012 6:12 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
condor

Posts: 30
Registered: 3/2/10
Re: GPU and Neural Network ... is this operation legitimate?
Posted: Nov 20, 2012 6:12 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I wrote this:

net.trainParam.showWindow = false;
net.trainParam.showCommandLine = false;

net_1=net;
net_2=net;

%GPU
tic
parfor ii=1500:1800
input_A=nndata2gpu(input(:,(ii-1500+1):1500-1));
target_A=nndata2gpu(target(:,(ii-1500+1):1500-1));
net_1=train(net,input_A,target_A);
end
toc
%CPU
tic
parfor iii=1500:1800
net_2=train(net,input(:,(iii-1500+1):iii-1),target(:,(iii-1500+1):iii-1));
end
toc

RESULTS:
GPU=Elapsed time is 63.126368 seconds.
CPU=Elapsed time is 8.482704 seconds.

I assume that the loop is not running on the GPU right?



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.