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
maskto get length by first converting it toLongTensorto avoid overflow. - Specify
dimexplicitly whensqueeze-ing to prevent squeezing unintended dimensions.