Skip to content

Commit

Permalink
Merge pull request lyhue1991#51 from neilteng/patch-4
Browse files Browse the repository at this point in the history
typo and add equivalence to Ellipsis represents
  • Loading branch information
lyhue1991 authored Jun 17, 2020
2 parents e8989d4 + 9b129ce commit c24979e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions english/Chapter4-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ tf.print(a)
```
[1 2 3]
```

```python
b = tf.range(1,10,delta = 2)
tf.print(b)
Expand Down Expand Up @@ -218,7 +217,7 @@ tf.print(tf.slice(t,[1,0],[3,5])) #tf.slice(input,begin_vector,size_vector)
```

```python
# From row 1 to the last row, and from column 0 to the last one with an increment of 2
# From row 1 to the last row, and from column 0 to the last but one with an increment of 2
tf.print(t[1:4,:4:2])
```

Expand Down Expand Up @@ -262,9 +261,14 @@ tf.print(a)
```python
# Ellipsis represents multiple colons
tf.print(a[...,1])
# This is equal to
tf.print(a[:,:,1])
```

```
[[3 0 6]
[3 8 1]
[0 2 9]]
[[3 0 6]
[3 8 1]
[0 2 9]]
Expand Down

0 comments on commit c24979e

Please sign in to comment.