deconv dim compatible

This commit is contained in:
albert-yan 2022-06-01 15:19:51 +08:00
parent 2f01d8b5bf
commit bd79cbc578
1 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,10 @@ class WeightDecoder {
if (op_parameter->type_ == schema::PrimitiveType_MatMulFusion) { if (op_parameter->type_ == schema::PrimitiveType_MatMulFusion) {
return GetMatMulPreferredDim(op_parameter, index, dims); return GetMatMulPreferredDim(op_parameter, index, dims);
} else if (op_parameter->type_ == schema::PrimitiveType_Conv2dTransposeFusion) { } else if (op_parameter->type_ == schema::PrimitiveType_Conv2dTransposeFusion) {
if (model_version.empty() ||
model_version.substr(model_version.size() - first_version_offset, model_version.size()) < "1.8.0") {
return 0;
}
return GetDeConvPreferredDim(op_parameter, dims); return GetDeConvPreferredDim(op_parameter, dims);
} else if (op_parameter->type_ == schema::PrimitiveType_Gather) { } else if (op_parameter->type_ == schema::PrimitiveType_Gather) {
return GetGatherPreferredDim(op_parameter, in_tensors); return GetGatherPreferredDim(op_parameter, in_tensors);