Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP3:Staging:adi:1
tensorflow2
numpy-tensor-small.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File numpy-tensor-small.patch of Package tensorflow2
Index: tensorflow2-2.4.0/tensorflow/python/ops/array_ops.py =================================================================== --- tensorflow2-2.4.0.orig/tensorflow/python/ops/array_ops.py +++ tensorflow2-2.4.0/tensorflow/python/ops/array_ops.py @@ -35,6 +35,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 * @@ -2801,7 +2802,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 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