tensorflow::tensorrt

Summary

Functions

ConvertAndBuild(const GraphDef & frozen_graph_def, const std::vector< string > & input_names, const std::vector< string > & output_names, const std::vector< std::vector< tensorflow::Tensor >> & inputs, const TfTrtConversionParams & conv_params)
StatusOr< GraphDef >
Converts the graph with TF-TRT.

Structs

tensorflow::tensorrt::TfTrtConversionParams

Functions

ConvertAndBuild

StatusOr< GraphDef > ConvertAndBuild(
  const GraphDef & frozen_graph_def,
  const std::vector< string > & input_names,
  const std::vector< string > & output_names,
  const std::vector< std::vector< tensorflow::Tensor >> & inputs,
  const TfTrtConversionParams & conv_params
)

Converts the graph with TF-TRT.

Performs TF-TRT conversion and returns the converted GraphDef. If inputs is not empty and convert_to_static_engine is requested, we also build the engines and convert the engines to static engines.

Arguments:

  • frozen_graph_def input graph, it is assumed to be frozen
  • input_names names of the input tensors
  • output_names names of the output tensors
  • inputs tensors that we will use as input while building the TRT engines
  • conv_params parameters for the TF-TRT conversion

Returns the converted graph_def.