neural_compressor.profiling.profiler.tensorflow_profiler.utils

Tensorflow profiler utils.

Functions

delete_assign(→ Any)

Modify graph nodes.

create_tf_config(→ Any)

Create tensorflow config.

set_eager_execution(→ None)

Set eager execution as required by model.

Module Contents

neural_compressor.profiling.profiler.tensorflow_profiler.utils.delete_assign(graph_def: Any) Any[source]

Modify graph nodes.

Parameters:

graph_def – TensorFlow GraphDef

Returns:

neural_compressor.profiling.profiler.tensorflow_profiler.utils.create_tf_config(tf_module: Any, intra_num_of_threads: int, inter_num_of_threads: int) Any[source]

Create tensorflow config.

Parameters:
  • tf_module – tensorflow module

  • intra_num_of_threads – number of threads used within an individual op for parallelism

  • inter_num_of_threads – number of threads used for parallelism between independent operations

Returns:

TensorFlow ConfigProto object

neural_compressor.profiling.profiler.tensorflow_profiler.utils.set_eager_execution(input_graph: str) None[source]

Set eager execution as required by model.

Parameters:

input_graph – path to tensorflow model

Returns:

None