|
|
@ -484,6 +484,8 @@ void ONNXImporter::populateNet(Net dstNet) |
|
|
|
layerParams.set("end", DictValue::arrayInt(&end[0], end.size())); |
|
|
|
layerParams.set("end", DictValue::arrayInt(&end[0], end.size())); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (layer_type == "Split") |
|
|
|
else if (layer_type == "Split") |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (layerParams.has("split")) |
|
|
|
{ |
|
|
|
{ |
|
|
|
DictValue splits = layerParams.get("split"); |
|
|
|
DictValue splits = layerParams.get("split"); |
|
|
|
const int numSplits = splits.size(); |
|
|
|
const int numSplits = splits.size(); |
|
|
@ -495,6 +497,11 @@ void ONNXImporter::populateNet(Net dstNet) |
|
|
|
slicePoints[i] = slicePoints[i - 1] + splits.get<int>(i - 1); |
|
|
|
slicePoints[i] = slicePoints[i - 1] + splits.get<int>(i - 1); |
|
|
|
} |
|
|
|
} |
|
|
|
layerParams.set("slice_point", DictValue::arrayInt(&slicePoints[0], slicePoints.size())); |
|
|
|
layerParams.set("slice_point", DictValue::arrayInt(&slicePoints[0], slicePoints.size())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
layerParams.set("num_split", node_proto.output_size()); |
|
|
|
|
|
|
|
} |
|
|
|
layerParams.type = "Slice"; |
|
|
|
layerParams.type = "Slice"; |
|
|
|
} |
|
|
|
} |
|
|
|
else if (layer_type == "Add" || layer_type == "Sum") |
|
|
|
else if (layer_type == "Add" || layer_type == "Sum") |
|
|
|