add cast(int64) for embedding
@@ -627,6 +627,12 @@ class OpSet9():
elif axis == 0 and len(indices_shape) > 1:
if val_x.out_shapes[0] is not None and isinstance(
val_x, ONNXGraphDataNode):
+ if indices.dtype != 'int64':
+ node.fluid_code.add_layer(
+ 'cast',
+ inputs=indices,
+ output=indices,
+ param_attr={'dtype': string('int64')})
node.fluid_code.add_layer(
'embedding',
inputs=indices,
