Giter Site home page Giter Site logo

torchscript_practice's Introduction

torchscript on python and C++

먼저 python 에 대한 실험을 해본다. grdn_forward.py 를 통해 inference 해보자.
python 에서 모델을 inference 할때 사용되는 모든 기능들이 c++ 에도 구현되어야 한다.

일단 grdn_forward.py 를 통해서 python 안에서의 결과는 traced 된 모델과 기존 torch 모델과 같음을 확인하였다.

또한 GPU 또한 잘 사용 됨을 확인 함. 추론 시간도 초기 한두번만 traced 모델이 더 오래걸리고, traced 모델과 torch 모델이 속도가 거의 같음을 확인함.

C++ 에서 traced model 을 돌려봄. python 의 결과와 다음의 차이가 있었음.

input_c_psnr : 34.4710069960766
input_python_psnr : 34.470999149919116

두 값은 0.0000078 차이가 남. 다른 언어기 때문에 발생하는 차이라고 생각할 수 있음??

torchscript_practice's People

Contributors

spnova12 avatar

Watchers

 avatar  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.