Skip to content

Commit 1878e4f

Browse files
authored
Merge pull request vahidk#10 from remram44/patch-reshape
tf.reshape() only need the same number of elements
2 parents de17922 + 32620bd commit 1878e4f

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ a = tf.placeholder(tf.float32, [None, 128])
118118
This means that the first dimension can be of any size and will be determined dynamically during Session.run(). You can query the static shape of a Tensor as follows:
119119

120120
```python
121-
static_shape = a.shape # returns TensorShape([Dimension(None), Dimension(128)])
122121
static_shape = a.shape.as_list() # returns [None, 128]
123122
```
124123

@@ -137,7 +136,6 @@ You can reshape a given tensor dynamically using tf.reshape function:
137136
```python
138137
a = tf.reshape(a, [32, 128])
139138
```
140-
Note that attempts to feed 'a' with values that don't match its shape, will raise InvalidArgumentError exception.
141139

142140
It can be convenient to have a function that returns the static shape when available and dynamic shape when it's not. The following utility function does just that:
143141
```python

0 commit comments

Comments
 (0)