avoid calling cast twice (#30527)

revert-31068-fix_conv3d_windows
Zhang Ting 4 years ago committed by GitHub
parent bdae7ed326
commit 34bf8dfc40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -228,6 +228,7 @@ def cast(x, dtype):
if not isinstance(dtype, core.VarDesc.VarType):
dtype = convert_np_dtype_to_dtype_(dtype)
out = core.ops.cast(x, 'in_dtype', x.dtype, 'out_dtype', dtype)
return out
check_variable_and_dtype(
x, 'x',

Loading…
Cancel
Save