Merge pull request #12963 from linux-on-ibm-z/TensorFlow_PR_Rank
Cover the numpy-ndarray bug on s390x
This commit is contained in:
commit
66eed36466
@ -626,7 +626,7 @@ def _ConstantValue(tensor, partial):
|
|||||||
elif tensor.op.type == "Rank":
|
elif tensor.op.type == "Rank":
|
||||||
input_shape = tensor.op.inputs[0].get_shape()
|
input_shape = tensor.op.inputs[0].get_shape()
|
||||||
if input_shape.ndims is not None:
|
if input_shape.ndims is not None:
|
||||||
return np.ndarray(shape=(), buffer=np.array([input_shape.ndims]),
|
return np.ndarray(shape=(), buffer=np.array([input_shape.ndims], dtype=np.int32),
|
||||||
dtype=np.int32)
|
dtype=np.int32)
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user