Giter VIP home page Giter VIP logo

mlinfras's Introduction

MLInfras: Neural Network Inference Framework

特性:

  • 支持:Conv2d、ResNet BasicBlock、Linear、MaxPool2d、BatchNorm2d、GAP、Softmax等神经网络模块(参考infras/myresnet.h)
  • 基于C++实现;兼容PyTorch训练框架
  • 高效的张量(Tensor,参考infras/myresnet.h)计算;支持张量级优化
  • 基于OpenBLAS线性运算库的底层自主实现
  • 预置ResNet32网络,并在GTSRB数据集上完成测试

Features:

  • Support: Conv2d, ResNet BasicBlock, Linear, MaxPool2d, BatchNorm2d, GAP, Softmax, etc. (refer to infras/myresnet.h)
  • Implemented in C++; Compatible with PyTorch training framework
  • Efficient Tensor computations (refer to infras/tensor.h); Tensor-level optimization supported
  • Low-level customization: OpenBLAS-based
  • ResNet32 implemented, tested on GTSRB dataset

程序运行 Usage

准备工作 Preliminaries

make

或者 or

make openblas # install OpenBLAS and opencv (~10min)
make -C ./data/traffic/ # download GTSRB dataset (depends on your network)
make -C ./infras/ poc.out # compile the inference framework (<1min)

模型训练 Training

导出PyTorch训练的模型

cd model
python train.py
python export_model.py

模型预测 Inference

使用MLInfras完成模型预测

make -C ./infras/

mlinfras's People

Contributors

shawn233 avatar

Watchers

 avatar

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.