fix bug in select_input: set var type of output to be the same as input. test=develop (#23076)

revert-23830-2.0-beta
liym27 5 years ago committed by GitHub
parent c4a6a0e2e4
commit 91a2627251
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -83,10 +83,14 @@ def select_input(inputs, mask):
if isinstance(inputs, list) or isinstance(inputs, tuple):
input_dtype = inputs[0].dtype
input_shape = inputs[0].shape
input_type = inputs[0].type
else:
input_dtype = inputs.dtype
input_shape = inputs.shape
out = helper.create_variable(dtype=input_dtype, shape=input_shape)
input_type = inputs.type
out = helper.create_variable(
dtype=input_dtype, shape=input_shape, type=input_type)
helper.append_op(
type='select_input',
inputs={'X': inputs,

Loading…
Cancel
Save