diff options
Diffstat (limited to 'tensorflow/python/ops/init_ops.py')
-rw-r--r-- | tensorflow/python/ops/init_ops.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/python/ops/init_ops.py b/tensorflow/python/ops/init_ops.py index b18cf1376f..fc8adf6421 100644 --- a/tensorflow/python/ops/init_ops.py +++ b/tensorflow/python/ops/init_ops.py @@ -66,7 +66,8 @@ def zeros_initializer(dtype=dtypes.float32): """Returns an initializer that generates tensors initialized to 0.""" def _initializer(shape, dtype=dtype, partition_info=None): - return constant_op.constant(0, dtype=dtype, shape=shape) + return constant_op.constant(False if dtype is dtypes.bool else 0, + dtype=dtype, shape=shape) return _initializer |