Load pretrained neural networks

6 views (last 30 days)
Kody Law
Kody Law on 1 May 2021
Answered: Kody Law on 6 May 2021
Hello, I am trying to load the pretrained neural networks via add-on explorer, and I always get the same error, below, for either "install" or "download", and every network.
""
Install folder error
This folder name is invalid. Folder names can contain alphanumeric characters and '-', '_', '.', or '/' only. The destination folder cannot be named "private".
""
Can someone please advise ?
  2 Comments
Nagasai Bharat
Nagasai Bharat on 4 May 2021
Hi,
Can you let me know the MATLAB version, OS and the Add-on pac you are using which is causing this issue.
Kody Law
Kody Law on 4 May 2021
R2020b originally, but just updated to R2021a and I have the same issue.
MacOS Big Sur, v11.3
vgg16, vgg19, alexnet, googlenet... literally any one, but please let me know if there is one specifically you'd like me to try.

Sign in to comment.

Accepted Answer

Kody Law
Kody Law on 6 May 2021
The path can be changed as follows.
Use the following command, in the MATLAB command window, to see the path:
matlabshared.supportpkg.getSupportPackageRoot
This path cannot have any of the offending characters in folder/filenames (e.g. in my case, Dropbox hijacked my Documents folder and used spaces and '()' in the name of that folder). This does not include the '/' symbols in between folders.
Change the folder/filenames as necessary with
matlabshared.supportpkg.setSupportPackageRoot('NEWPATH')
And off you go. Thanks so much to Adrian at HQ for providing clear and useful support by email.
Cheers!
Kody

More Answers (2)

Nagasai Bharat
Nagasai Bharat on 4 May 2021
Hi,
As the alternative you could refer the following documentation link to import pretained networks into MATLAB. This would help you with your task using another approach.
  3 Comments
Kody Law
Kody Law on 4 May 2021
Sorry I responded to this below.
If you can just tell me where
Deep Learning Toolbox Model for VGG-16 Network
Is trying to download to, then maybe I can use the tmpdir trick there. This is pretty weak support though, to be honest. Why doesn’t it work? And moreover, why isn’t the error message helpful at all:
This folder name is invalid. Folder names can contain alphanumeric characters and '-', '_', '.', or '/' only. The destination folder cannot be named "private".
How about a path? A workaround? What folder? What name?
Thanks,
Kody

Sign in to comment.


Kody Law
Kody Law on 4 May 2021
Thanks, Nasgasi, I've seen this and it is not useful for me. Please respond below, if you can. Thanks so much, Kody
1) Create a folder that will be used temporarily during installation
Created.
2) Open Terminal application
Opened.
3) Drag and drop install script into Terminal from your MATLAB directory that contains installation files to be installed
Can you please clarify this ? Where is this install script ?
4) Add -tmpdir flag pointing to your newly created temporary folder in the following manner:
/Users/YourUsername/Downloads/matlab_R2014a_maci64/install -tmpdir /Users/YourUsername/Desktop/temporaryfolder/
(base) Kodys-MacBook-Pro:~ kody$ /Users/kody/Downloads/matlab_R2021a_maci64-2/install -tmpdir /Users/kody/Desktop/temporaryfolder/
-bash: /Users/kody/Downloads/matlab_R2021a_maci64-2/install: No such file or directory
Not sure what’s going on here.
Are you suggesting if I reinstall after successfully finding the appropriate directory, then I will be able to use the add-on manager, or should I be adding it on from the beginning ? I just reinstalled yesterday, and these packages are not available at that stage from my recollection.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!