Giter Site home page Giter Site logo

torch_to_tf-lite's Introduction

pytorch_to_tensorflow

Enviroments

  • Windows 10 laptop
  • CPU 11th Gen Intel(R) Core(TM) i7-11375H @ 3.30GHz (cpu)
  • tensorflow 2.7.0

0. Pytorch Resnet18

  • Standard pytorch resnet18 Model
  • Performace evaluation(Execution time of 100 iteration for one 224x224x3 image)
  • PyTorch (cpu) -> 3235 [ms]
  • PyTorch (gpu) -> 363 [ms]

1. Pytorch to Tensorflow by ONNX

  • Conversion pytorch to tensorflow by onnx
    • Tensorflow (cpu) -> 3748 [ms]
    • Tensorflow (gpu) -> 832 [ms]

2. Pytorch to Tensorflow by functional API

  • Conversion pytorch to tensorflow by using functional API
    • Tensorflow (cpu) -> 4804 [ms]
    • Tensorflow (gpu) -> 3227 [ms]

3. Tensorflow lite on CPU

  • Conversion pytorch to tensorflow by functional API
    • Tensorflow lite f32 -> 7781 [ms], 44.5 [MB]
      • max index : 388 , prob : 13.55378, class name : giant panda panda panda bear coon ...
    • Tensorflow lite f16 -> 5447 [ms], 22.3 [MB]
      • max index : 388 , prob : 13.54807, class name : giant panda panda panda bear coon ...
    • Tensorflow lite int8 -> 977569 [ms], 11.2 [MB]
      • max index : 388 , prob : 13.71834, class name : giant panda panda panda bear coon ...
  • Conversion pytorch to tensorflow by onnx
    • Tensorflow lite f32 -> 6133 [ms], 44.5 [MB]
      • max index : 388 , prob : 13.80411, class name : giant panda panda panda bear coon ...
    • Tensorflow lite f16 -> 6297 [ms], 22.3 [MB]
      • max index : 388 , prob : 13.79882, class name : giant panda panda panda bear coon ...
    • Tensorflow lite int8 -> 1072768 [ms], 11.2 [MB]
      • max index : 388 , prob : 14.05152, class name : giant panda panda panda bear coon ...
  • Calculated on 2021-12-09

4. Tensorflow lite on raspberry pi 4

Reference :

torch_to_tf-lite's People

Contributors

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