Giter Site home page Giter Site logo

christofernal / custom-pooling-operation Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 1.0 9 KB

Learn how to create a pooling operation from scratch using Pytorch (python) or building your own C++ extension.

License: MIT License

C++ 7.27% Python 1.21% Jupyter Notebook 91.51%
max-pool pytorch python feature-pooling-module custom-poooling pooling-max-average

custom-pooling-operation's Introduction

custom-pooling-operation

Learn how to create a pooling operation from scratch using Pytorch (python) or building your own C++ extension.

The tutorial in a relative link includes:

  • Implementation of max pool using the python API of pytorch.
  • Implementation of max pool using the C++ API of pytorch and instructions on how to build a python binding.
  • Performance comparison of the custom max pool in python, the C++ extension and the native pytorch max pool operation.

Setup

Install the both the python and the C++ distribution of pytorch. Instructions for the C++ distribution can be found here https://pytorch.org/cppdocs/installing.html In order to build the custom model run the following commands from your pytorch environment:

  • cd /cpp
  • python setup.py install

You should get something like this:

Installed ~/anaconda2/envs/torch/lib/python3.7/site-packages/pooling_cpp-0.0.0-py3.7-linux-x86_64.egg Processing dependencies for pooling-cpp==0.0.0 Finished processing dependencies for pooling-cpp==0.0.0

custom-pooling-operation's People

Contributors

christofernal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

qqqhy

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.