how to reload saved ANN model in workspace properly
조회 수: 20 (최근 30일)
이전 댓글 표시
I am not able to load the saved ANN model on the workspace . The "net" file does not appear only input , output and results. (check the image)
댓글 수: 0
채택된 답변
Cris LaPierre
2023년 11월 25일
It looks like your network was not saved in your mat file. What code did you use to create the mat file? Had your network variable been created at the time you create the mat file?
load breakersize2.mat
out = net([1;1])
추가 답변 (1개)
Walter Roberson
2023년 11월 26일
Suppose that you exported from nftool to the variable named results then
net = results.Network;
댓글 수: 5
Walter Roberson
2023년 11월 26일
Fine. Then after you get results extract Network from it into net and save it to a mat file just so that you can still l file to load()
Walter Roberson
2023년 11월 26일
x = rand(4,241);
y = randi(3, 1, 241);
nftool
%Import -> Import Data, select x and y, Observations in Columns, OK
%Train
%Export Model -> Export to Workspace, variable named results
net = results.Network;
predicted_y = round(net(x));
accuracy = mean(y == predicted_y) * 100 %percent
참고 항목
카테고리
Help Center 및 File Exchange에서 Classification Learner App에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!