o
    ?e3                     @   sX   d Z ddlmZ ddlmZ ddlmZ ddlmZ e	ddedgd	d
d Z
dS )z!Quantize training for TensorFlow.    )	graph_pb2)"DoQuantizeTrainingOnGraphDefHelper)deprecation)	tf_exportNzDGraphDef quantized training rewriter is deprecated in the long term.z&train.do_quantize_training_on_graphdef)v1c                 C   s$   t  }t|  |}|| |S )an  A general quantization scheme is being developed in `tf.contrib.quantize`.

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

  Args:
    input_graph: A `GraphDef`.
    num_bits: The number of bits for quantize training.

  Returns:
    The graph with quantize training done.
  )r   ZGraphDefr   ZSerializeToStringZParseFromString)Zinput_graphZnum_bitsgraphZresult_graph_string r   m/home/www/facesmatcher.com/pyenv/lib/python3.10/site-packages/tensorflow/python/training/quantize_training.py do_quantize_training_on_graphdef   s   
r
   )__doc__Ztensorflow.core.frameworkr   Z+tensorflow.python._pywrap_quantize_trainingr   Ztensorflow.python.utilr   Z tensorflow.python.util.tf_exportr   
deprecatedr
   r   r   r   r	   <module>   s   
