MATLAB Answers

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

조회 수: 5(최근 30일)
David Hyatt
David Hyatt 2021년 5월 9일
댓글: David Hyatt 2021년 5월 17일
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

채택된 답변

Asvin Kumar
Asvin Kumar 2021년 5월 12일
편집: Asvin Kumar 2021년 5월 17일
[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

댓글을 달려면 로그인하십시오.

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by