agatan / warp-ctc

PyTorch bindings for Warp-CTC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

warpctc module for PyTorch

Thomas Viehmann tv@lernapparat.de

This is a warpctc module for PyTorch. It targets PyTorch 0.4+ and uses the C++ extension mechanism.

Warp-CTC was created by Baidu, see the original README and github project.

The idea is to

cd pytorch_bindings
python3 setup.py bdist_wheel

and install the wheel in pytorch_bindings/dist. Remember to set the compiler as you do to compile PyTorch. You can test with

python3 tests/test.py -v

Note that this is not the same as Sean Naren's great Warp-CTC PyTorch wrapper, which is the most popular binding for CTC Loss I am aware of. I have tried to make the bindings look as PyTorch-y as possible in terms of interface, have checks on all tensor sizes, and also to stay close to the modern way of doing things in the internals by using ATen. (Sean created his set of bindings when PyTorch was in a much earlier stage.)

About

PyTorch bindings for Warp-CTC

License:Apache License 2.0


Languages

Language:Cuda 49.8%Language:C++ 33.4%Language:Python 10.8%Language:C 2.5%Language:Lua 1.9%Language:CMake 1.6%