<h2 dir="auto">System information</h2>
<p dir="auto">Have I written custom code (as opposed to using a stock example script provided in TensorFlow):no<br>
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):CentOS Linux release 7.2<br>
TensorFlow installed from (source or binary):Anaconda python 3.6.5(conda install)<br>
TensorFlow version (use command below):1.8.0<br>
Python version: 3.6.5<br>
Bazel version (if compiling from source): 0.7.0<br>
GCC/Compiler version (if compiling from source): 4.8.5<br>
CUDA/cuDNN version:cuda-9.0<br>
GPU model and memory: P40<br>
Phone: N/A</p>
<h2 dir="auto">Describe the problem</h2>
<p dir="auto">Hi ~</p>
<p dir="auto">When I used API 'tf.contrib.quantize.experimental_create_training_graph' to add quantization nodes, it will match some layers**(not all convs layers)** to add quantization nodes. This will lead to some layers using float32, but some with float8(quantization bit is 8). When I use 'toco_convert', it just support inference_type: Currently must be {FLOAT, QUANTIZED_UINT8}. I think it need all layers to be FLOAT or QUANTIZED_UINT8. So it will raise this errors.</p>
<h2 dir="auto">Error log</h2>
<p dir="auto">F tensorflow/contrib/lite/toco/tooling_util.cc:1445] Array model/resnet_model/Relu, which is an input to the Conv operator producing the output array model/resnet_model/conv2d_1/Conv2D, is lacking min/max data, which is necessary for quantization. Either target a non-quantized output format, or change the input graph to contain min/max information, or pass --default_ranges_min= and --default_ranges_max= if you do not care about the accuracy of results.\n'</p>
<p dir="auto">So I think <strong>it is contradictory in the API</strong>. pls help me, thank you.</p>
<h2 dir="auto">Network</h2>
<p dir="auto">Network: ResNet20</p>
<p dir="auto">TF version: r1.8(I find it dose not support --default_ranges_min and --default_ranges_max in the python api of r1.8. But in r1.9 it supports)</p>
<h2 dir="auto">System information</h2>
<p dir="auto">Have I written custom code (as opposed to using a stock example script provided in TensorFlow):no<br>
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):CentOS Linux release 7.2<br>
TensorFlow installed from (source or binary):Anaconda python 3.6.5(conda install)<br>
TensorFlow version (use command below):1.8.0<br>
Python version: 3.6.5<br>
Bazel version (if compiling from source): 0.7.0<br>
GCC/Compiler version (if compiling from source): 4.8.5<br>
CUDA/cuDNN version:cuda-9.0<br>
GPU model and memory: P40<br>
Phone: N/A</p>
<p dir="auto">Hi~<br>
When I use 'tf.contrib.quantize.experimental_create_training_graph'  it will add fake quantization in the graph.  reference this picture(find positions to insert fake quantization nodes).<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9084403/41646572-c5a48d8a-74a6-11e8-81bf-d1fee67d5c4a.png"><img src="https://user-images.githubusercontent.com/9084403/41646572-c5a48d8a-74a6-11e8-81bf-d1fee67d5c4a.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I think it will add a fake quantization node in the bypass, but I can not find it in the tensorboard graph(in the red box, it is the bypass). In other convs, I can find the quantization node.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9084403/41649732-d6f538d4-74ae-11e8-87b5-66b2b49904a7.png"><img src="https://user-images.githubusercontent.com/9084403/41649732-d6f538d4-74ae-11e8-87b5-66b2b49904a7.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">My network architecture is ResNet20,  tensorflow version is 1.8.0</p>
<p dir="auto">pls help me. thank you.</p>