ebetica / autogradpp

Direct C++ Interface to PyTorch
MIT License
80 stars 12 forks source link

Fix serialization of contiguous tensor views #65

Closed jgehring closed 6 years ago

jgehring commented 6 years ago

Two of the new test cases, serialization/resized and serialization/sliced would previously result in out-of-bound writes or simply wrong data. This is fixed by writing the correct portion of the underlying storage. Tensors that have been serialized with older coder can still be loaded.

Another test, serialization/noncontig, has been added for the sake of completeness.