Update lod_tensor.md (#5383)

An important change on lod tensor indexing. A higher level offset will be based on its next level rather than an absolute offset.
mobile_baidu
Yang Yang(Tony) 7 years ago committed by GitHub
parent c9b57dcc83
commit 701545979b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -140,19 +140,9 @@ Similarly, the lengths in the top level LoD
are transformed into offsets of elements/words as follows: are transformed into offsets of elements/words as follows:
``` ```
0 9 10 15 0 3 4 6
= = = = = =
3+2+4 1+9 2+3+10 3 3+1 4+2
```
so we can tell that the first article is from word 0 to word 9, and the second article is from word 9 to word 10.
The complete offset representation is as follows:
```
0 9 10 15
0 3 5 9 10 12 15
||| || |||| | || |||
``` ```
## Slicing of LoD Tensors ## Slicing of LoD Tensors

Loading…
Cancel
Save