How can I use NARX network on GPU?

4 ビュー (過去 30 日間)
Riku Koyama
Riku Koyama 2018 年 6 月 18 日
コメント済み: Walter Roberson 2018 年 6 月 21 日
Hello.
I want to use GPU to speed up training of NARX. But it stopped at the 'Computing Resources: GPU device #1, GeForce GTX 750 Ti' i waited 3 hours but it say nothing.
My network is composed with 3 layers(Input layer,Intermediate layer,Output layer). it has 15 inputs and 1 output. so i decided to divide these inputs and output but i don't understand how to do it. Please tell me the way to divide training data.
Reference ver:matlab2017b
Program X = con2seq(input);% input is matfile which has size of 15×30001 T = con2seq(output);% input is matfile which has size of 1×30001
net = narxnet(1:2,1:4,5,'open'); [x,xi,ai,t] = preparets(net,X,[],T);
[net,tr] = train(net,x,ai,'useGPU','yes');

採用された回答

Etsuo Maeda
Etsuo Maeda 2018 年 6 月 21 日
Your question title might be “How can I use NARX network on GPU” or “How can I train NARX network on GPU”, and “How can I use NARX network with multi-input”. Generally, one question should be related to one title. Wrong title makes the answers confusing. Tips for asking good questions to get accurate answers quickly may help you to write a good question.
1. GPU memory size: NVIDIA GeForce GTX 750 Ti has 2GB GPU memory. Have you checked the volume of your data? Is it lower than 2GB? In case of GPU calculation, you need to pay attention to the amount of your GPU memory.
2. GPU vs CPU: In case of small calculation, CPU is much much much faster than GPU. This is because GPU calculation needs a transfer sequence from RAM to GPU memory. See and check the following code.
[X,T] = simpleseries_dataset;
Xnew = X(81:100);
X = X(1:80);
T = T(1:80);
net = narxnet(1:2,1:2,10);
[Xs,Xi,Ai,Ts] = preparets(net,X,{},T);
tic
net1 = train(net,Xs,Ts,Xi,Ai,'useGPU','no');
toc
net2 = train(net,Xs,Ts,Xi,Ai,'useGPU','yes');
toc
3. NARXnet with multi-input: The following Q&A might help you.
https://jp.mathworks.com/matlabcentral/answers/302908-narxnet-with-multi-input
HTH
  6 件のコメント
Riku Koyama
Riku Koyama 2018 年 6 月 21 日
In this sentence,"However, if the data consists of multiple sequences, it can be parallelized across the separate sequences." is mean single series data shoud be divided by cattimesteps command ? I don't understand the data consists of multiple sequences. What is the data shape?
For example,single series data([1,2,3,4,5]) convert to x1([1,2,3]),and x2([4,5]). After that,I use cattimesteps command,
" X = cattimesteps(x1,x2) "
In this time,this data X consists of multiple sequences,doesn't?
thank you.
Japanese
この文章だと複数の時系列データであれば問題ないようですが,具体的にどういった形ですか?
Walter Roberson
Walter Roberson 2018 年 6 月 21 日
I think "multiple sequences" would be if you passed it a cell array of data.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by