Closed marikgoldstein closed 6 years ago
Thanks for the pull request, much appreciated!
The TypeError was due to the cost
variable being a Tensor as well, fixed it locally. I'll rebase and merge this branch.
Merged as 3c64937cb075e737528ff7ecf02b2c1c6d8347a1 Thanks!
Thanks! Awesome repo.
This commit fixes a few deprecation warnings thrown by PyTorch 0.4.0.
Merge of Variable and Tensor:
Variable(a_tensor)
toa_tensor
Support for PyTorch Scalars of 0-dimension
loss.data[0]
toloss.item()
Naming conventions in nn.init
nn.init.constant
tonn.init.constant_
nn.init.uniform
tonn.init.uniform_
nn.init.xavier_uniform
tonn.init.xavier_uniform_
This pull request does not fix
TypeError: Object of type 'Tensor' is not JSON serializable
thrown bysave_checkpoint
on line 83 of train.py, which seems to be an issue new to PyTorch 0.4.0.Thanks! This is a great implementation!!! Mark