Fix numpy-ndarray bug
On zSystems, the ndarray is not retaining the values for nparray. Defining the data type is required to get the desired behavior.
This commit is contained in:
parent
702d595822
commit
76ad78c6dd
@ -627,7 +627,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