From 7fd123b908201f3110bc4050434be58c2e96f03d Mon Sep 17 00:00:00 2001 From: buxue Date: Fri, 29 May 2020 10:40:18 +0800 Subject: [PATCH] support tensor index data type int64 for tensor get item. --- docs/source_en/constraints_on_network_construction.md | 5 +++-- docs/source_zh_cn/constraints_on_network_construction.md | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/source_en/constraints_on_network_construction.md b/docs/source_en/constraints_on_network_construction.md index c50480af80..69345b9878 100644 --- a/docs/source_en/constraints_on_network_construction.md +++ b/docs/source_en/constraints_on_network_construction.md @@ -105,10 +105,11 @@ The index operation includes `tuple` and` Tensor`. The following focuses on the - Assignment: Not supported yet. - Tensor index: index is `Tensor` - - Value: `tensor_x [index]`, `index` must be `Tensor` of type `int32`, the element value range is `[0, tensor_x.shape[0])`. + - Value: `tensor_x [index]`, `index` must be `Tensor` of data type `int32` or `int64`, + the element value range is `[0, tensor_x.shape[0])`. - Assignment: `tensor_x [index] = U`. - `tensor_x` data type must be one of the following: `float16`, `float32`, `int8`, `uint8`. - - `index` must be `Tensor` of type `int32`, the element value range is `[0, tensor_x.shape [0])`. + - `index` must be `Tensor` of data type `int32`, the element value range is `[0, tensor_x.shape [0])`. - `U` can be `Number`, `Tensor`, `Tuple` only containing `Number`, `Tuple` only containing `Tensor`. - Single `Number` or every `Number` in `Tuple` must be the same type as `tensor_x`, ie When the data type of `tensor_x` is `uint8` or `int8`, the `Number` type should be `int`; diff --git a/docs/source_zh_cn/constraints_on_network_construction.md b/docs/source_zh_cn/constraints_on_network_construction.md index 7d270dd356..ff628c7982 100644 --- a/docs/source_zh_cn/constraints_on_network_construction.md +++ b/docs/source_zh_cn/constraints_on_network_construction.md @@ -102,7 +102,7 @@ - 取值:`tensor_x[True]`。 - 赋值:暂不支持。 - Tensor索引:index为`Tensor` - - 取值:`tensor_x[index]`,`index`必须是`int32`类型的`Tensor`,元素取值范围在`[0, tensor_x.shape[0])`。 + - 取值:`tensor_x[index]`,`index`必须是`int32`、`int64`类型的`Tensor`,元素取值范围在`[0, tensor_x.shape[0])`。 - 赋值:`tensor_x[index]=U`。 - `tensor_x`的数据类型必须是下面一种: `float16`,`float32`,`int8`,`uint8`。 - `index`必须是`int32`类型的`Tensor`,元素取值范围在`[0, tensor_x.shape[0])`。 -- Gitee