cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
519 Views
Registered: ‎08-02-2019

Decent gives error with Dropout layer.

Jump to solution

When I run decent_q.sh with my frozen tensorflow model, after the calibration is done I get the following error:

INFO: Calibration Done.
INFO: Generating Deploy Model...
2019-08-26 16:43:03.547205: F tensorflow/contrib/decent_q/utils/deploy_quantized_graph.cc:583] Check failed: scale_node.attr().count("wpos") [DEPLOY ERROR] Cannnot find quantize info for weights: dropout/random_uniform/sub/_0__cf__0
Aborted (core dumped)

I am using DNNDK version 3.1. How can I avoid this error ?

Thank you.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Participant
Participant
483 Views
Registered: ‎09-11-2018

Dropout layers are only used while training the model and are turned off during inference.Therefore you can just remove them from your original model. One way to do this for example is by creating a new model similiar to your trained model, but without the Dropout layers. You then copy the weights from the original model into your new model and freeze it (Dropout layers don't have weights). During inference the models will behave exactly the same.

View solution in original post

1 Reply
Highlighted
Participant
Participant
484 Views
Registered: ‎09-11-2018

Dropout layers are only used while training the model and are turned off during inference.Therefore you can just remove them from your original model. One way to do this for example is by creating a new model similiar to your trained model, but without the Dropout layers. You then copy the weights from the original model into your new model and freeze it (Dropout layers don't have weights). During inference the models will behave exactly the same.

View solution in original post