let shape = [2'i64, 3]
let t = zeros(shape.asTorchView(), kFloat32)
check t == [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0]].toTensor
This is caused by toTensor creating "implicitly" a float64 Tensor.
This can be solved by :
let shape = [2'i64, 3]
let t = zeros(shape.asTorchView(), kFloat32)
check t == [[0.0'f32, 0.0, 0.0], [0.0'f32, 0.0, 0.0]].toTensor
Can be reproduced with equal function.
==, equal operator should check for Tensor type and potentially raise an exception (?) to avoid crashing the program.
This can be solved with generic Tensor type ;)
Tensor comparaison cause segfault :
This is caused by
toTensor
creating "implicitly" a float64 Tensor.This can be solved by :
Can be reproduced with
equal
function.==
,equal
operator should check for Tensor type and potentially raise an exception (?) to avoid crashing the program. This can be solved with generic Tensor type ;)