RNNの学習において​、多次元入力での学習​は可能でしょうか?

10 views (last 30 days)
Soya
Soya on 15 Sep 2016
Commented: Soya on 16 Sep 2016
RNN学習において、入力が多次元の場合でも学習可能でしょうか?
↑例ではX(特徴量)が1次元であり、試しに
X{1,1}=[0.8147] のところを X{1,1}=[0.8147 0.8147]とし、2次元で学習させようとしたところ以下のエラーが出ました。
エラー: nntraining.setup>setupPerWorker (line 64)
Layer states Ai{2,1} and Layer states Ai{1,1}have different numbers of columns.
エラー: nntraining.setup (line 43) [net,data,tr,err] = setupPerWorker(net,trainFcn,X,Xi,Ai,T,EW,enableConfigure);
エラー: network/train (line 335) [net,data,tr,err] = nntraining.setup(net,net.trainFcn,X,Xi,Ai,T,EW,enableConfigure,isComposite);
多次元入力のRNNが学習可能か、また可能であればプログラムの書き方をご教授頂けたら幸いです。 宜しくお願い致します。
  3 Comments
Soya
Soya on 15 Sep 2016
thank you for answer.
my question is 'is it possible to train RNN using multi-dimensional input in MATLAB?'.
I tried 2 dimensional-input-training of RNN based in the example. but the error occurred.
Greg Heath
Greg Heath on 15 Sep 2016
The data must be in the form of N pairs of "I"-dimensional "I"nput column vectors and "O"-dimensional "O"utput target column vectors
[ I N ] = size(input)
[ O N ] = size(target)
Hope this helps
Greg

Sign in to comment.

Accepted Answer

michio
michio on 16 Sep 2016
例えば、X{1,1}=[0.8147; 0.8147] と行数を出力のそれと合わせることで、複数要素の時系列入力を使うことが出来ます。ドキュメンテーションの例ですと、
[X,T] = simpleseries_dataset;
A = cell2mat(X);
AA = [A;A];
XX = mat2cell(AA,2,ones(1,100));
と入力データを作成できますので、試してみてください。
[Xs,Xi,Ai,Ts] = preparets(net,XX,T);
net = train(net,Xs,Ts,Xi,Ai);
view(net)
Y = net(Xs,Xi,Ai);
perf = perform(net,Y,Ts)
また、
>> ntstool
で立ち上がるGUIツールがありますが、ツール上での処理を再現するコードを出力させることもできるのでおすすめです。 Neural Network Time-Series Prediction and Modeling
  1 Comment
Soya
Soya on 16 Sep 2016
Michio 様
ありがとうございます。解決いたしました。

Sign in to comment.

More Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!