Skip to content

Latest commit

 

History

History
55 lines (42 loc) · 854 Bytes

README.md

File metadata and controls

55 lines (42 loc) · 854 Bytes

PPQI.jl

Julia Version PaddlePaddle Quick Inference.

Install Package

using Pkg

Pkg.add(url="https://github.com/AgentMaker/PPQI.jl")

API Reference

  • load_config:

    function load_config(
      modelpath::String, 
      use_gpu::Bool=false, 
      gpu_id::Int=0, 
      use_mkldnn::Bool=false, 
      cpu_treads::Int=1
    )::PyObject
    
      return config::PyObject
  • load_model:

    function load_model(
      config::PyObject
    )::InferenceModel
    
      return model::InferenceModel
  • InferenceModel:

    struct InferenceModel
        predictor::PyObject
        input_handles::Vector{PyObject}
        output_handles::Vector{PyObject}
    end
  • model_forward:

    function model_forward(
      model::InferenceModel, 
      input_datas::Vector
    )::Vector
    
      return output_datas::Vector