remove too tricky code
@@ -891,8 +891,6 @@ class OpSet9():
'this is not supported')
if len(value) == 1:
value = value[0]
- if dtype.name == 'int64':
- dtype = 'int32'
attr = {
'shape': val_shape.layer_name,
'dtype': string(dtype),
@@ -1037,12 +1035,16 @@ class OpSet9():
@print_mapping_info
def Concat(self, node):
inputs = []
+ dtypes = set()
for i in range(len(node.layer.input)):
ipt = self.graph.get_input_node(node, idx=i, copy=True)
if isinstance(ipt, str):
inputs.append(ipt)
else:
inputs.append(ipt.layer_name)
+ dtypes.add(ipt.dtype)
+ if len(dtypes) > 1:
+ assert 'Unspported situation happened, please create issue on https://github.com/PaddlePaddle/X2Paddle/issues.'
axis = node.get_attr('axis')
attr = {'axis': axis}
node.fluid_code.add_layer(
