Giter Club home page Giter Club logo

wechat-tfcc's Introduction

TFCC

TFCC is a C++ deep learning inference framework.

TFCC provides the following toolkits that faciliate your development and deployment of your trained DL models:

Porject Source Description
TFCC ./tfcc The core of deep learning inference library. It provides friendly interfaces for model deployment, as well as the implementation of diverse operations in both MKL and CUDA environments.
TFCC Code Generator ./tfcc_code_generator An automatic generator that can optimize the structure of your high-level models (tensorflows, pytorch, etc.) and generate the TFCC model.
TFCC Runtime ./tfcc_runtime An runtime to load TFCC model and inference.

BUILD

Run

./build.sh ${INSTALL_PREFIX_PATH}

Quick Start

  1. Convert Model

    The script generator.py can convert onnx model or tensorflow model to tfcc model. The docs Convert ONNX Model and Convert TF Model show the details.

  2. Load Model

    There is a simple way to load a model as following code:

    // load tfcc model to a string.
    std::string modelData = load_data_from_file(path);
    tfcc::runtime::Model model(modelData);
    
  3. Inference

    Finally run the model

    tfcc::runtime::data::Inputs inputs;
    tfcc::runtime::data::Outputs outputs;
    
    // set inputs
    auto item = inputs.add_items();
    item->set_name("The input name");
    item->set_dtype(tfcc::runtime::common::FLOAT);
    std::vector<float> data = {1.0, 2.0};
    item->set_data(data.data(), data.size() * sizeof(float));
    
    model.run(inputs, outputs);
    

    Complete code

wechat-tfcc's People

Contributors

lqlsoftware avatar xhy940801 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wechat-tfcc's Issues

从tensorflow获得一个tfcc模型

作者你好,请问tensorflow2 的模型可以转换成tfcc模型吗?这边使用tensorflow2版本的mobilenet-v1转换时,总是报错
list index out of range
谢谢。

可否详细介绍一下 常数跟踪 技术?

"常数跟踪是指跟踪常量的走向,是比常量折叠更激进的优化方案,该方案可以对详细区分一个矩阵存在的局部常量,从而得到模型的更详细的信息,达到更好的模型结构优化效果。"

感觉挺有意思,大佬们可否详细介绍一下?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.