warp-CTC安装
http://www.pianshen.com/article/862428080/
warpctc_pytorch 编译不成功的解决办法
warp-CTC是百度开源的一个可以应用在CPU和GPU上高效并行的CTC代码库,对CTC算法进行了并行处理。
warp-CTC安装:
git clone https://github.com/SeanNaren/warp-ctc.git
cd warp-ctc
mkdir build; cd build
cmake ..
make
cd ../pytorch_binding
python setup.py install
添加环境变量:
gedit ./.bashrc
export WARP_CTC_PATH=/home/xxx/warp-ctc/build
验证pytorch中warp-CTC是否可用GPU例子:
cd /home/xxx/warp-ctc/pytorch_binding/tests
python test_gpu.py
OK输出:
或:
import torch
from torch.autograd import Variable
from warpctc_pytorch import CTCLoss
ctc_loss = CTCLoss()
# expected shape of seqLength x batchSize x alphabet_size
probs = torch.FloatTensor([[[0.1, 0.6, 0.1, 0.1, 0.1], [0.1, 0.1, 0.6, 0.1, 0.1]]]).transpose(0, 1).contiguous()
labels = Variable(torch.

本文介绍了在Win10系统下,如何安装warp-CTC并解决pytorch_binding编译问题。通过克隆warp-CTC仓库,进行编译与安装,然后验证在PyTorch中使用GPU的CTC损失函数。在遇到'Dll Load Failed'错误时,可将相关dll文件复制到相应目录。同时,提供了在VS 2017中构建的步骤。
最低0.47元/天 解锁文章
2300

被折叠的 条评论
为什么被折叠?



