blob: d63f752be7590a8f3a85abb4122d589fb02dce03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
import candle
t = candle.Tensor(42.0)
print(t)
print("shape", t.shape, t.rank)
print(t + t)
t = candle.Tensor([3.0, 1, 4, 1, 5, 9, 2, 6])
print(t)
print(t+t)
t = t.reshape([2, 4])
print(t.matmul(t.t()))
|