jpuigcerver / pytorch-baidu-ctc

PyTorch bindinga for Baidu's Warp-CTC
Apache License 2.0
59 stars 11 forks source link

ValueError: Unsupported reduction type None #6

Closed kei6 closed 5 years ago

kei6 commented 5 years ago

I've faced with this issue and still stuck at this. Can you help to fix? Thanks a lot

  File "/home/ocr/anaconda3/envs/pika/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/ocr/anaconda3/envs/pika/lib/python3.6/site-packages/torch_baidu_ctc/__init__.py", line 167, in forward
    blank=self.blank,
  File "/home/ocr/anaconda3/envs/pika/lib/python3.6/site-packages/torch_baidu_ctc/__init__.py", line 117, in ctc_loss
    raise ValueError("Unsupported reduction type {!r}".format(reduction))
ValueError: Unsupported reduction type None
jpuigcerver commented 5 years ago

Fixed with 45356ef3e90f6cdf5a280db514f075d023eb93c5. I'm not generating new packages for PyTorch 1.0, though. I will create a new version with PyTorch 1.1, the new stable version.