Skip to content

Commit 2b95536

Browse files
authored
Fix typo in "Understanding static and dynamic shapes"
1 parent 1bcb06f commit 2b95536

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ def get_shape(tensor):
151151

152152
Now imagine we want to convert a Tensor of rank 3 to a tensor of rank 2 by collapsing the second and third dimensions into one. We can use our get_shape() function to do that:
153153
```python
154-
b = placeholder(tf.float32, [None, 10, 32])
155-
shape = get_shape(tensor)
154+
b = tf.placeholder(tf.float32, [None, 10, 32])
155+
shape = get_shape(b)
156156
b = tf.reshape(b, [shape[0], shape[1] * shape[2]])
157157
```
158158
Note that this works whether the shapes are statically specified or not.

0 commit comments

Comments
 (0)