# tf.compat.v1.train.do_quantize_training_on_graphdef

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/training/quantize_training.py#L23-L46) |

A general quantization scheme is being developed in `tf.contrib.quantize`. (deprecated)

    tf.compat.v1.train.do_quantize_training_on_graphdef(
        input_graph, num_bits
    )

> [!WARNING]
> **Deprecated:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: GraphDef quantized training rewriter is deprecated in the long term.

Consider using that instead, though since it is in the tf.contrib namespace,
it is not subject to backward compatibility guarantees.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `input_graph` | A `GraphDef`. |
| `num_bits` | The number of bits for quantize training. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The graph with quantize training done. ||

<br />