mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
One more test.
This commit is contained in:
@ -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]]]
|
||||
|
Reference in New Issue
Block a user