save the neural network object
save('./dat/bpnn_00.mat', 'bpnn'); % | file name | nn obj | // it`s easy.
load the neural network object
newData1 = load('-mat', './dat/bpnn_00.mat'); % transfer variable format vars = fieldnames(newData1); for i = 1:length(vars) assignin('base', vars{i}, newData1.(vars{i})); end
MATLAB get 'bpnn' of the neural network object, but the neural network can`t simulate. I don`t know why the neural network object can`t directly simulate.
nnResult = sim(bpnn, nnInput); % nnResult is error value
I add a 'getx' function to program, and 'nnResult' of the neural network is correct value. Why?
nnWB = getx(bpnn); % <-- why? nnResult = sim(bpnn, nnInput); % nnResult is correct value
It maybe the weight and bias value don`t put to the variable of the neural network tool when MATLAB load the MAT-file.