Multi Input Multi Sequence Neural Network
조회 수: 4 (최근 30일)
이전 댓글 표시
The question is how to define a multi input multi sequence neural network (NN) in Matlab?
There is a way to define multi sequence NN:
x1 = [4 5 6];
x2 = [4 5 6];
y1 = [1 2 3];
y2 = [1 2 3];
x = {[x1;x2]};
y={[y1;y2]};
net = fitnet(1);
net = train(net,x,y);
view(net)
https://www.mathworks.com/help/nnet/ug/multiple-sequences-with-dynamic-neural-networks.html
There is also a way to define multi input NN:
x1 = [4 5 6];
x2 = [4 5 6];
y1 = [1 2 3];
y2 = [1 2 3];
x = {x1;x2};
y=y1;
net = fitnet(1);
net.numinputs = 2;
net.inputConnect = [1 1; 0 0];
net = train(net,x,y);
view(net)
https://www.mathworks.com/matlabcentral/answers/355286-how-to-give-multiple-inputs-to-the-train-function-of-neural-network
When I try to combine these two conditions:
x1 = [4 5 6];
x2 = [4 5 6];
y1 = [1 2 3];
y2 = [1 2 3];
x = {{[x1;x2]};{[x1;x2]}};
y={y1;y2};
net = fitnet(1);
net.numinputs = 2;
net.inputConnect = [1 1; 0 0];
net = train(net,x,y);
view(net)
I get error:
Error using nntraining.setup>setupPerWorker (line 61)
Inputs X{1,1} is not numeric or logical.
Error in nntraining.setup (line 43)
[net,data,tr,err] = setupPerWorker(net,trainFcn,X,Xi,Ai,T,EW,enableConfigure);
Error in network/train (line 335)
[net,data,tr,err] = nntraining.setup(net,net.trainFcn,X,Xi,Ai,T,EW,enableConfigure,isComposite);
댓글 수: 0
답변 (1개)
Kenta
2021년 9월 10일
편집: Kenta
2021년 9월 10일
As of now, you can use custom training loop for deep learning for the multi-input. This is a bit different from what you want, but I believe it helps you.
https://jp.mathworks.com/matlabcentral/fileexchange/74760-image-classification-using-cnn-with-multi-input-cnn
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!