summaryrefslogtreecommitdiff
path: root/candle-pyo3/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'candle-pyo3/test.py')
-rw-r--r--candle-pyo3/test.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/candle-pyo3/test.py b/candle-pyo3/test.py
index c78ffc41..7f24b49d 100644
--- a/candle-pyo3/test.py
+++ b/candle-pyo3/test.py
@@ -1,5 +1,4 @@
import candle
-from candle import Tensor, QTensor
t = candle.Tensor(42.0)
print(t)
@@ -10,7 +9,7 @@ t = candle.Tensor([3.0, 1, 4, 1, 5, 9, 2, 6])
print(t)
print(t+t)
-t:Tensor = t.reshape([2, 4])
+t = t.reshape([2, 4])
print(t.matmul(t.t()))
print(t.to_dtype(candle.u8))
@@ -21,7 +20,7 @@ print(t)
print(t.dtype)
t = candle.randn((16, 256))
-quant_t:QTensor = t.quantize("q6k")
-dequant_t:Tensor = quant_t.dequantize()
-diff2:Tensor = (t - dequant_t).sqr()
+quant_t = t.quantize("q6k")
+dequant_t = quant_t.dequantize()
+diff2 = (t - dequant_t).sqr()
print(diff2.mean_all())