From ac060d13fbac51f40f7476c72bb19d0eb10195da Mon Sep 17 00:00:00 2001 From: tiruka Date: Thu, 26 Dec 2024 11:39:08 +0900 Subject: [PATCH] modify documents for tensor api --- burn-book/src/building-blocks/tensor.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/burn-book/src/building-blocks/tensor.md b/burn-book/src/building-blocks/tensor.md index 6ef80a81d0..7108bd9d82 100644 --- a/burn-book/src/building-blocks/tensor.md +++ b/burn-book/src/building-blocks/tensor.md @@ -157,7 +157,7 @@ Those operations are available for all tensor kinds: `Int`, `Float`, and `Bool`. | `tensor.narrow(dim, start, length)` | `tensor.narrow(dim, start, length)` | | `tensor.not_equal(other)` | `x != y` | | `tensor.permute(axes)` | `tensor.permute(axes)` | -| `tensor.one_hot_plus(depth, on_value, off_value, axis)` | N/A | +| `tensor.one_hot_fill(depth, on_value, off_value, axis)` | N/A | | `tensor.movedim(src, dst)` | `tensor.movedim(src, dst)` | | `tensor.repeat_dim(dim, times)` | `tensor.repeat(*[times if i == dim else 1 for i in range(tensor.dim())])` | | `tensor.repeat(sizes)` | `tensor.repeat(sizes)` | @@ -259,7 +259,7 @@ Those operations are only available for `Float` tensors. | Burn API | PyTorch Equivalent | | --------------------------------------------- | ---------------------------------- | -| `Tensor::one_hot(index, num_classes, device)` | N/A | +| `tensor.one_hot(num_classes)` | `torch.nn.functional.one_hot` | | `tensor.cast(dtype)` | `tensor.to(dtype)` | | `tensor.ceil()` | `tensor.ceil()` | | `tensor.cos()` | `tensor.cos()` | @@ -297,7 +297,7 @@ Those operations are only available for `Int` tensors. | `tensor.from_ints(ints)` | N/A | | `tensor.int_random(shape, distribution, device)` | N/A | | `tensor.cartesian_grid(shape, device)` | N/A | -| `tensor.one_hot(num_classes)` | N/A | +| `tensor.one_hot(num_classes)` | `torch.nn.functional.one_hot` | ### Bool Operations