tch-ext 0.2.0

Sample Python extension using tch to interact with PyTorch.
1
2
3
4
5
6
7
import tch_ext
import torch
print(tch_ext.__file__)

t = torch.tensor([[1., -1.], [1., -1.]])
print(t)
print(tch_ext.add_one(t))