From b996c507a26be12aa61a7b331ae35ae4dd998fa3 Mon Sep 17 00:00:00 2001 From: Raphael Doukhan Date: Mon, 18 Sep 2023 15:10:14 +0000 Subject: [PATCH] GITBOOK-26: Fix doc --- ...rifiable-linear-regression-model-in-orion.md | 7 +------ docs/framework/operators/tensor/tensor.slice.md | 17 +++++++---------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/docs/academy/tutorials/verifiable-linear-regression-model-in-orion.md b/docs/academy/tutorials/verifiable-linear-regression-model-in-orion.md index 65e610f14..d69fddb21 100644 --- a/docs/academy/tutorials/verifiable-linear-regression-model-in-orion.md +++ b/docs/academy/tutorials/verifiable-linear-regression-model-in-orion.md @@ -237,14 +237,9 @@ struct Tensor { shape: Span, data: Span } - -struct ExtraParams { - fixed_point: Option -} - ``` -A `Tensor` in Orion takes a shape and a span array of the data and an extra parameter. In a 16x16 fixed-point format, there are 16 bits dedicated to the integer part of the number and 16 bits for the fractional part of the number. This format allows us to work with a wide range of values and a high degree of precision for conducting the OLS Tensor operations. +A `Tensor` in Orion takes a shape and a span array of the data. We work with a `Tensor`. In a 16x16 fixed-point format, there are 16 bits dedicated to the integer part of the number and 16 bits for the fractional part of the number. This format allows us to work with a wide range of values and a high degree of precision for conducting the OLS Tensor operations. ### Implementing OLS functions using Orion diff --git a/docs/framework/operators/tensor/tensor.slice.md b/docs/framework/operators/tensor/tensor.slice.md index f2843b53d..1f33e3fba 100644 --- a/docs/framework/operators/tensor/tensor.slice.md +++ b/docs/framework/operators/tensor/tensor.slice.md @@ -1,6 +1,6 @@ # tensor.slice -```rust +```rust fn slice(self: @Tensor, starts: Span, ends: Span, axes: Option>, steps: Option>) -> Tensor; ``` @@ -9,10 +9,10 @@ Produces a slice of the input tensor along multiple axes. ## Args * `self`(`@Tensor`) - Tensor of data to extract slices from. -* `starts`(Span) - 1-D tensor of starting indices of corresponding axis in `axes` -* `ends`(Span) - 1-D tensor of ending indices (exclusive) of corresponding axis in `axes` -* `axes`(Option>) - 1-D tensor of axes that `starts` and `ends` apply to. -* `steps`(Option>) - 1-D tensor of slice step of corresponding axis in `axes`. +* `starts`(Span) - 1-D tensor of starting indices of corresponding axis in `axes` +* `ends`(Span) - 1-D tensor of ending indices (exclusive) of corresponding axis in `axes` +* `axes`(Option\) - 1-D tensor of axes that `starts` and `ends` apply to. +* `steps`(Option\) - 1-D tensor of slice step of corresponding axis in `axes`. ## Panics @@ -20,7 +20,7 @@ Produces a slice of the input tensor along multiple axes. * Panics if the length of starts is not equal to the length of axes. * Panics if the length of starts is not equal to the length of steps. -## Returns +## Returns A new `Tensor` slice of the input tensor. @@ -29,15 +29,12 @@ A new `Tensor` slice of the input tensor. ```rust use array::{ArrayTrait, SpanTrait}; -use orion::operators::tensor::core::{TensorTrait, Tensor, ExtraParams}; -use orion::operators::tensor::implementations::impl_tensor_u32::{Tensor_u32}; -use orion::numbers::fixed_point::core::{FixedType, FixedTrait, FixedImpl}; +use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor}; fn slice_example() -> Tensor { let tensor = TensorTrait::::new( shape: array![2, 4].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(), - extra: Option::None(()) ); return tensor.slice(