mirror of
https://github.com/huggingface/candle.git
synced 2025-06-19 03:54:56 +00:00
Fix the cat implementation + more testing.
This commit is contained in:
@ -210,18 +210,18 @@ fn cat() -> Result<()> {
|
||||
.t()?
|
||||
.to_vec2::<f32>()?,
|
||||
[
|
||||
[3.0, 4.0, 5.0, 5.0, 5.0],
|
||||
[2.0, 1.0, 2.0, 7.0, 8.0],
|
||||
[1.0, 1.0, 5.0, 5.0, 5.0],
|
||||
[7.0, 8.0, 2.0, 1.0, 2.0]
|
||||
[3.0, 1.0, 4.0, 1.0, 5.0],
|
||||
[2.0, 7.0, 1.0, 8.0, 2.0],
|
||||
[5.0, 5.0, 5.0, 5.0, 5.0],
|
||||
[2.0, 7.0, 1.0, 8.0, 2.0]
|
||||
]
|
||||
);
|
||||
// TODO: This is not the expected answer, to be fixed!
|
||||
assert_eq!(
|
||||
Tensor::cat(&[&t1, &t2], 1)?.to_vec2::<f32>()?,
|
||||
[
|
||||
[3.0, 1.0, 4.0, 1.0, 5.0, 2.0, 7.0, 1.0, 8.0, 2.0],
|
||||
[5.0, 5.0, 5.0, 5.0, 5.0, 2.0, 7.0, 1.0, 8.0, 2.0]
|
||||
[3.0, 1.0, 4.0, 1.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0],
|
||||
[2.0, 7.0, 1.0, 8.0, 2.0, 2.0, 7.0, 1.0, 8.0, 2.0]
|
||||
]
|
||||
);
|
||||
Ok(())
|
||||
|
Reference in New Issue
Block a user