I want to know how to perform quantization-aware t

2019-07-26 16:42发布

问题:

I have been trying to perform quantization aware training for deeplab using the guide given in this link https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/quantize However, I am not sure where exactly to put the below 2 lines that are required to activate the quantization

g = tf.get_default_graph() tf.contrib.quantize.create_training_graph(input_graph=g,quant_delay=2000000)

Where exactly in the deeplab train.py file do I put the above two lines? I already tried on line 355, which is right after computing the loss and just before the optimizer initialization, as mentioned in the guide, but it gives a segmentation fault.