loudinthecloud / pytorch-ntm

Neural Turing Machines (NTM) - PyTorch Implementation
BSD 3-Clause "New" or "Revised" License
589 stars 128 forks source link

Various PyTorch 0.4.0 updates #12

Closed marikgoldstein closed 6 years ago

marikgoldstein commented 6 years ago

This commit fixes a few deprecation warnings thrown by PyTorch 0.4.0.

Merge of Variable and Tensor:

Support for PyTorch Scalars of 0-dimension

Naming conventions in nn.init

This pull request does not fix TypeError: Object of type 'Tensor' is not JSON serializable thrown by save_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

loudinthecloud commented 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.

loudinthecloud commented 6 years ago

Merged as 3c64937cb075e737528ff7ecf02b2c1c6d8347a1 Thanks!

marikgoldstein commented 6 years ago

Thanks! Awesome repo.