Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP4
tensorflow2
tensorflow-2.6.0-numpy-tensor-small.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File tensorflow-2.6.0-numpy-tensor-small.patch of Package tensorflow2
--- a/tensorflow-2.6.0/tensorflow/python/ops/array_ops.py +++ b/tensorflow-2.6.0/tensorflow/python/ops/array_ops.py @@ -36,6 +36,7 @@ from tensorflow.python.framework import from tensorflow.python.framework.constant_op import constant from tensorflow.python.ops import gen_array_ops from tensorflow.python.ops import gen_math_ops +from tensorflow.python.ops import math_ops # go/tf-wildcard-import # pylint: disable=wildcard-import from tensorflow.python.ops.gen_array_ops import * @@ -2897,7 +2898,7 @@ def matrix_set_diag( def _constant_if_small(value, shape, dtype, name): try: - if np.prod(shape) < 1000: + if math_ops.reduce_prod(shape) < 1000: return constant(value, shape=shape, dtype=dtype, name=name) except (NotImplementedError, TypeError): # Happens when shape is a Tensor, list with Tensor elements, etc.
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor