vgg16 and vgg19 give this error: "Attempt to execute SCRIPT vgg16 as a function:"
9 ビュー (過去 30 日間)
古いコメントを表示
so I am trying to use CNN's alexnet, vgg16 and vgg19 to see which CNN gives the best accuracy. I downloaded all necessary toolboxes and toolbox models. I can get alexnet to work fine but when I use the exact same code they give in the documentation for vgg16 and vgg19 it gives me an error: "Attempt to execute SCRIPT vgg16 as a function:". Any suggestions would be great. I have already have reinstalled everything this is the code I'm using:
net = vgg16
and
net = vgg19
3 件のコメント
Rik
2018 年 6 月 29 日
You can't use the Matlab documentation for vgg16, because you shadowed the function. That means that you're not running the normal Matlab function, so you'll have to look into that custom function itself for help on how to use it. If you want to use the builtin function, remove/rename the custom file, or remove it from the path by changing your current folder.
If you use functions that are not built in, include a link to that content, so people can try to reproduce your error and give targeted help.
回答 (1 件)
dpb
2018 年 6 月 29 日
You tried to assign a return value to a variable on the LHS of an expression -- scripts don't have return values; they operate in the global workspace.
2 件のコメント
Rik
2018 年 6 月 29 日
One addition: scripts don't operate in the global workspace, but in the workspace of the function that calls them. For most people that would be the base workspace, but some people use scripts outside of debugging.
参考
カテゴリ
Help Center および File Exchange で Downloads についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
