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.