message: Update converter docs to be v2 friendly.
diff: @@ -14,7 +14,29 @@ During conversion, set the `optimizations` flag to optimize for size:
  ```
  converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir)
  -converter.optimizations = [tf.lite.Optimize.OPTIMIZE_FOR_SIZE]
  +converter.optimizations = [tf.lite.Optimize.DEFAULT]
  +tflite_quant_model = converter.convert()
  +```
  +
  +# Full integer quantization of weights and activations
  +
  +We can get further latency improvements, reductions in peak memory usage, and
  +access to integer only hardware accelerators by making sure all model math is
  +quantized. To do this, we need to measure the dynamic range of activations and
  +inputs with a representative data set. You can simply create an input data
  +generator and provide it to our converter.
  +
  +```
  +import tensorflow as tf
  +
  +def representative_dataset_gen():
  + for _ in range(num_calibration_steps):
  + # Get sample input data as a numpy array in a method of your choosing.
  + yield [input]
  +
  +converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir)
  +converter.optimizations = [tf.lite.Optimize.DEFAULT]
  +converter.representative_dataset = representative_dataset_gen
  tflite_quant_model = converter.convert()
  ```
  @@ -25,10 +47,13 @@ latency, smaller size, and integer-only accelerators compatible model.
  Currently, this requires training a model with
  ["fake-quantization" nodes](https://github.com/tensorflow/tensorflow/tree/r1.13/tensorflow/contrib/quantize).
  +This is only available in the v1 converter. A longer term solution that's
  +compatible with 2.0 semantics is in progress.
  +
  Convert the graph:
  ```
  -converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir)
  +converter = tf.compat.v1.lite.TFLiteConverter.from_saved_model(saved_model_dir)
  converter.inference_type = tf.lite.constants.QUANTIZED_UINT8
  input_arrays = converter.get_input_arrays()
  converter.quantized_input_stats = {input_arrays[0] : (0., 1.)} # mean, std_dev
  