Getting dltargets.​internal.g​etNetworkI​nputSizes error when trying to quantize trained network

2 views (last 30 days)
I used the Deep Network Designer app to train googlenet using transfer learning. The network works fine. When I open the Deep Network Quantizer app and select "new" no networks appear in the network list. Clicking refresh or selecting CPU doesn't affect it.
When I try to run dlquantizer in the command window with the network in the workspace I get the error:
Unable to resolve the name dltargets.internal.getNetworkInputSizes.
What am I doing wrong?
The network is a 1x1 DAGNetwork
Layers: [144×1 nnet.cnn.layer.Layer]
Connections: [170×2 table]
InputNames: {'data'}
OutputNames: {'classoutput'}
Thanks

Accepted Answer

Asvin Kumar
Asvin Kumar on 12 May 2021
Edited: Asvin Kumar on 17 May 2021
[EDIT]
David figured out that he needed GPU Coder Interface for Deep Learning Libraries.
More details on the requirements for quantization are in the hyperlink.
~~~ Original Answer ~~~
Hi David,
Here's the workflow that works for me. I'm using R2021a. I, mostly, followed the steps in this example.
  1. Open Deep Network Designer (DND).
  2. Load pretrained googlenet.
  3. Modify the network to my training data.
  4. Load the training data.
  5. Train the network.
I assume it works for you as well until this point. If you try to load the trained network into Deep Network Quantizer (DNQ) at this stage, it would not be possible since DNQ loads networks/quantizer objects from the workspace. So, you should export from DND before importing into DNQ. Here are my next steps which worked.
  1. Export trained network to workspace from DND.
  2. Load network from workspace.
  3. Create a dlquantizer network using the exported trained network.
You might have had issues in loading the trained network into DNQ because it wasn't exported to the workspace yet from DND. I'm not sure why you're seeing the dltargets.internal.getNetworkInputSizes error. If you're still seeing it, please attach detailed reproduction steps. This question says you're on R2021a as well. Please confirm your release version once again so that I can try to recreate your error at my end.
  9 Comments
Asvin Kumar
Asvin Kumar on 17 May 2021
Updated. You can use the contact us link to create a service request where you can drop in your suggestions/ideas. :) Have a good day, David.

Sign in to comment.

More Answers (0)

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!