ctc安装

2735的镜像

git clone https://github.com/SeanNaren/warp-ctc.git
cd warp-ctc
git checkout ac045b6072b9bc3454fb9f9f17674f0d59373789
mkdir build; cd build
cmake ..
make
cd ../pytorch_binding/
python setup.py install

报错则修改如下:

1. binding.cpp文件的92行修改成如下:
int probs_size = THCudaTensor_size(state, probs, 2);


2. binding.cpp文件的105行修改成如下:
void* gpu_workspace;
THCudaMalloc(state, &gpu_workspace, gpu_size_bytes);

重新python setup.py install

export WARP_CTC_PATH="/home/zy1992/warp-ctc/build"
cd ../build
cp libwarpctc.so /usr/lib

pip install pytest

你可能感兴趣的:(ctc安装)