Merge pull request #44521 from gonnet:patch-3

PiperOrigin-RevId: 343862750
Change-Id: I11086777b4446a80812db7dbdcc9b460fd66f138
This commit is contained in:
TensorFlower Gardener 2020-11-23 09:19:38 -08:00
commit 91f2cca8d5

View File

@ -1678,14 +1678,13 @@ def zeros_like(x, dtype=None, name=None):
Example:
```python
from tensorflow.keras import backend as K
kvar = K.variable(np.random.random((2,3)))
kvar_zeros = K.zeros_like(kvar)
K.eval(kvar_zeros)
# array([[ 0., 0., 0.], [ 0., 0., 0.]], dtype=float32)
```
"""
return array_ops.zeros_like(x, dtype=dtype, name=name)