mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-07 12:20:24 +01:00
tf.zeros doesn't accept a tensor argument
ValueError: Shape must be rank 1 but is rank 0 for 'zeros_2' (op: 'Fill') with input shapes: [], [].
This commit is contained in:
parent
231ca9dd4e
commit
36696ad583
|
|
@ -197,7 +197,7 @@ For example, here is how to make a vector of zeros with the same size as the
|
||||||
number of columns in a given matrix:
|
number of columns in a given matrix:
|
||||||
|
|
||||||
``` python
|
``` python
|
||||||
zeros = tf.zeros(tf.shape(my_matrix)[1])
|
zeros = tf.zeros(my_matrix.shape[1])
|
||||||
```
|
```
|
||||||
|
|
||||||
### Changing the shape of a `tf.Tensor`
|
### Changing the shape of a `tf.Tensor`
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user