- When the app is finished it generates a script with the function - myNeuralNetworkFunction(X,Xi,~) where Xi should be cell array.
- As you mentioned that you are using y = myNeuralNetworkFunction(input,2). Here second argument is not cell array i.e. Xi = 2.
- Hence provide second argument as cell array to myNeuralNetworkFunction.
Using the myNeuralNetworkFunction generated from the Neural Network Toolbox App
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi,
Forgive me if this is a simple problem but I can't seem to use the function generated after training a LSTM network in the app.
Once the app is finished it generates a script with the function, however, when i try to put a new data set into in it ([8xTS] 8 features over TS timesteps) the function rejects it with the error:
Cell contents reference from a non-cell array object.
Error in myNeuralNetworkFunction (line 75)
Xd1{ts} = mapminmax_apply(Xi{1,ts},x1_step1);
Here's the section of the script:
Xd1 = cell(1,3);
for ts=1:2
Xd1{ts} = mapminmax_apply(Xi{1,ts},x1_step1);
end
and the line I'm trying to input is
y = myNeuralNetworkFunction(input,2)
What am I doing wrong here?
Thanks in advance for your help
댓글 수: 0
답변 (1개)
Anshika Chaurasia
2020년 8월 12일
Hi Damien,
%[Y,Xf,Af] = myNeuralNetworkFunction(X,Xi,~) takes these arguments:
%
% X = 1xTS cell, 1 inputs over TS timesteps
% Each X{1,ts} = 2xQ matrix, input #1 at timestep ts.
%
% Xi = 1x2 cell 1, initial 2 input delay states.
% Each Xi{1,ts} = 2xQ matrix, initial states for input #1.
%
% Ai = 2x0 cell 2, initial 2 layer delay states.
% Each Ai{1,ts} = 10xQ matrix, initial states for layer #1.
% Each Ai{2,ts} = 2xQ matrix, initial states for layer #2.
%
% and returns:
% Y = 1xTS cell of 1 outputs over TS timesteps.
% Each Y{1,ts} = 2xQ matrix, output #1 at timestep ts.
%
% Xf = 1x2 cell 1, final 2 input delay states.
% Each Xf{1,ts} = 2xQ matrix, final states for input #1.
%
% Af = 2x0 cell 2, final 0 layer delay states.
% Each Af{1ts} = 10xQ matrix, final states for layer #1.
% Each Af{2ts} = 2xQ matrix, final states for layer #2.
%
% where Q is number of samples (or series) and TS is the number of timesteps.
댓글 수: 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!