diff options
Diffstat (limited to 'candle-core/tests/pth.py')
-rw-r--r-- | candle-core/tests/pth.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/candle-core/tests/pth.py b/candle-core/tests/pth.py new file mode 100644 index 00000000..97724712 --- /dev/null +++ b/candle-core/tests/pth.py @@ -0,0 +1,8 @@ +import torch +from collections import OrderedDict + +# Write a trivial tensor to a pt file +a= torch.tensor([[1,2,3,4], [5,6,7,8]]) +o = OrderedDict() +o["test"] = a +torch.save(o, "test.pt") |