crnn.pytorch
crnn.pytorch copied to clipboard
Convolutional recurrent network in pytorch
in the train.py, we calculate loss by: cost = criterion(preds, text, preds_size, length) / batch_size but the sample provided by pytorch does not divide batch_size, so should we divide batch_Size?
during training, the train accuracy was 96% or higher, the eval accuracy was only 10%. Finally,for a single picture, the train mode will predict the length well even though it...
pytorch1.01 python3.6 python train.py --adadelta --trainRoot /home/chase/crnn.pytorch-master/tool/tool/ --valRoot /home/chase/crnn.pytorch-master/tool/tool/ --cuda --random_sample Namespace(adadelta=True, adam=False, alphabet='0123456789abcdefghijklmnopqrstuvwxyz', batchSize=64, beta1=0.5, cuda=True, displayInterval=500, expr_dir='expr', imgH=32, imgW=100, keep_ratio=False, lr=0.01, manualSeed=1234, n_test_disp=10, nepoch=25, ngpu=1, nh=256, pretrained='', random_sample=True,...
python 2.7 pytorch0.4 Traceback (most recent call last): File "train.py", line 217, in cost = trainBatch(crnn, criterion, optimizer) File "train.py", line 191, in trainBatch data = train_iter.next() File "lll/venv/lib/python2.7/site-packages/torch/utils/data/dataloader.py", line...
如下图所示: ![1](https://user-images.githubusercontent.com/37755235/91928598-0d339c80-ed0f-11ea-8709-4791446a004e.png) ![2](https://user-images.githubusercontent.com/37755235/91928611-13c21400-ed0f-11ea-9a8c-4ed83bee80c9.png) ![3](https://user-images.githubusercontent.com/37755235/91928612-145aaa80-ed0f-11ea-811c-cf87dfc8a347.png)
看train.py文件的第98行代码: image = torch.FloatTensor(opt.batchSize, 3, opt.imgH, opt.imgH) 按照常理来说,应该是image = torch.FloatTensor(opt.batchSize, 3, opt.imgH, opt.imgW) 可是我改成这样之后重新训练,不收敛的。请问作者,这里的image为什么要定义成torch.FloatTensor(opt.batchSize, 3, opt.imgH, opt.imgH)而不是torch.FloatTensor(opt.batchSize, 3, opt.imgH, opt.imgW)呢?
只能单张测试,怎么整体测试啊!急急急有偿