mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 18:48:51 +00:00
Remove extra square bracket (#372)
This commit is contained in:

committed by
GitHub

parent
a5c5a893aa
commit
5b79b38bc7
@ -78,7 +78,7 @@ Cheatsheet:
|
|||||||
|
|
||||||
| | Using PyTorch | Using Candle |
|
| | Using PyTorch | Using Candle |
|
||||||
|------------|------------------------------------------|------------------------------------------------------------------|
|
|------------|------------------------------------------|------------------------------------------------------------------|
|
||||||
| Creation | `torch.Tensor([[1, 2], [3, 4]])` | `Tensor::new(&[[1f32, 2.]], [3., 4.]], &Device::Cpu)?` |
|
| Creation | `torch.Tensor([[1, 2], [3, 4]])` | `Tensor::new(&[[1f32, 2.], [3., 4.]], &Device::Cpu)?` |
|
||||||
| Creation | `torch.zeros((2, 2))` | `Tensor::zeros((2, 2), DType::F32, &Device::Cpu)?` |
|
| Creation | `torch.zeros((2, 2))` | `Tensor::zeros((2, 2), DType::F32, &Device::Cpu)?` |
|
||||||
| Indexing | `tensor[:, :4]` | `tensor.i((.., ..4))?` |
|
| Indexing | `tensor[:, :4]` | `tensor.i((.., ..4))?` |
|
||||||
| Operations | `tensor.view((2, 2))` | `tensor.reshape((2, 2))?` |
|
| Operations | `tensor.view((2, 2))` | `tensor.reshape((2, 2))?` |
|
||||||
|
Reference in New Issue
Block a user