mirror of
https://github.com/huggingface/candle.git
synced 2025-06-19 03:54:56 +00:00
Cleanup some todos. (#226)
* Cleanup some todos. * Fix more todo. * Optimize for the contiguous case. * Add the IntDType trait. * Handle the intdtype trait for more ops. * Remove a todo. * Remove a todo.
This commit is contained in:
@ -270,7 +270,11 @@ fn cat(device: &Device) -> Result<()> {
|
||||
[2.0, 7.0, 1.0, 8.0, 2.0]
|
||||
]
|
||||
);
|
||||
// TODO: This is not the expected answer, to be fixed!
|
||||
// PyTorch equivalent:
|
||||
// import torch
|
||||
// t1 = torch.tensor([[3, 1, 4, 1, 5], [2, 7, 1, 8, 2]])
|
||||
// t2 = torch.tensor([[5]*5, [2, 7, 1, 8, 2]])
|
||||
// torch.cat([t1.t(), t2.t()], dim=1).t()
|
||||
assert_eq!(
|
||||
Tensor::cat(&[&t1.t()?, &t2.t()?], 1)?
|
||||
.t()?
|
||||
@ -282,7 +286,6 @@ fn cat(device: &Device) -> Result<()> {
|
||||
[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>()?,
|
||||
[
|
||||
|
Reference in New Issue
Block a user