crnn
crnn copied to clipboard
Is there any possible to use cudnn.BLSTM to replace bidirectionalLSTM and use Baidu's warp_ctc to replace CtcCriterion?
Is there any possible to use cudnn.BLSTM to replace bidirectionalLSTM and use Baidu's warp_ctc to replace CtcCriterion?Thus i can use cudnn to boost the system.
@bgshih
@ll36771 I haven't tested warp_ctc yet, but I guess they implement the same algorithm. cudnn.BLSTM should also be a better choice. Please let me know if you find them workable, thanks!
Hello! I have a little question about the bidirectionalLSTM, where is this function defined? Is it existed in some other libs? Thank you!
@shengyudingli you can get cudnn.BLSTM from https://github.com/soumith/cudnn.torch
@ll36771 : Could you use cudnn.BLSTM in CRNN successfully? I tried to use it sometime back but couldn't use it successfully. Will try it again soon so any pointer will be appreciated.
@bgshih @ravikantb :I use the cudnn.BLSTM and CtcCriterion.But when i train the picture,the loss will stop at around 44 and accuracy is 0.
model:add(cudnn.BLSTM(512, nl/2, 2, true)) --nl is 38
model:add(nn.SplitTable(2, 3))
map = nn.MapTable()
map:add(nn.LogSoftMax())
model:add(map)
model:add(nn.JoinTable(2))
model:add(nn.View(nt,nl))
model:add(nn.Copy('torch.CudaTensor', 'torch.FloatTensor', false, true))
model:cuda()
When i try the cudnn.BRNN instead of cudnn.BLSTM,it works.But the accuracy is not very high.In theory,LSTM should works better than RNN.