WenmuZhou / PytorchOCR

基于Pytorch的OCR工具库,支持常用的文字检测和识别算法

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

为什么eval里面的batch_size必须为1

cqray1990 opened this issue · comments

'loader': {
'type': 'DataLoader',
'batch_size': 1, # 必须为1
'shuffle': False,
'num_workers': 1,
'collate_fn': {
'type': 'DetCollectFN'

crnn的输入可以长度不限的,所以batchsize为1,不然你每个image的tensor size不同。没法凑成一个size的tensor。除非你保证的image的width为固定值。