Files
pytorch/test/smoke.py
Soumith Chintala 5ee3358a92 python 2 support
2016-06-08 19:14:57 -04:00

25 lines
217 B
Python

import torch
a = torch.FloatTensor(4, 3)
b = torch.FloatTensor(3, 4)
a.add(b)
c = a.storage()
d = a.select(0, 1)
print(c)
print(a)
print(b)
print(d)
a.fill(0)
print(a[1])
print(a.ge(long(0)))
print(a.ge(0))