Releases: kmkurn/pytorch-crf
Releases · kmkurn/pytorch-crf
PyTorch 0.4.1 support
There isn't much new stuff in this release:
- PyTorch 0.4.1 support
- Batched Viterbi decoding (thanks @JeppeHallgren)
We are now in beta!
We are now in beta version. Hopefully there won't be anymore breaking changes. Here are the details of what's new:
- Backward compatibility support for
summed
keyword argument inforward
method is now removed. Keyword argument ofreduce
is preferred to match PyTorch's convention. - Masks are converted to
LongTensor
before summation to avoid overflow. This is a serious bug for a long input sequence (>= 255). - Minor stylistic refactoring.
Fixing issues and refactorings
Backport from v0.4.1
Upgrade to PyTorch 0.3.0 and minor changes
Upgrade to PyTorch 0.3.0
PyTorch 0.3.0 is out! We upgrade our PyTorch dependency to version 0.3.0, so now we can use its fancy indexing to get transition score instead of manually broadcasting tensors.
Others
- Fix summing
mask
to get length by first converting it toLongTensor
to avoid overflow. - Specify
dim
explicitly whensqueeze
-ing to prevent squeezing unintended dimensions.