Class Interpreter

Nested Relationships

Nested Types

Class Documentation

class cinn::frontend::Interpreter

The executor for a model.

Public Functions

Interpreter(const std::vector<std::string> &input_names, const std::vector<hlir::framework::shape_t> &input_shapes)
void LoadPaddleModel(const std::string &model_dir, const Target &target, bool params_combined = false, const std::string &model_name = "")

Load a Paddle model.

Parameters
  • model_dir: The directory path to the model.

  • params_combined: Whether the parameters are composed to a single file.

void Run()

Run the executor.

hlir::framework::Tensor GetTensor(const std::string &name)
std::shared_ptr<hlir::framework::Scope> scope()
~Interpreter()
struct Impl

Public Functions

Impl(const std::vector<std::string> &input_names, const std::vector<hlir::framework::shape_t> &input_shapes)
void Build(const std::vector<std::string> &input_names, const std::vector<hlir::framework::shape_t> &input_shapes, const Target &target, const std::string &model_name = "")

Build the model.

Parameters
  • input_names: The name of input variables.

  • input_shapes: The input shapes.