One more test.

This commit is contained in:
laurent
2023-06-25 10:57:46 +01:00
parent ba0693a908
commit 5e03a1bc29

View File

@ -116,6 +116,10 @@ fn sum() -> Result<()> {
tensor.sum(&[2])?.to_vec3::<u32>()?,
&[[[8], [15]], [[10], [18]]]
);
assert_eq!(
tensor.sum(&[0])?.to_vec3::<u32>()?,
&[[[5, 2, 11], [9, 7, 17]]],
);
assert_eq!(
tensor.t()?.sum(&[1])?.t()?.to_vec3::<u32>()?,
&[[[8], [15]], [[10], [18]]]