- else if (attribute_proto.has_g() || attribute_proto.strings_size() > 0 ||
- attribute_proto.tensors_size() > 0 || attribute_proto.graphs_size() > 0)
+ else if (attribute_proto.has_g())
+ {
+ CV_Error(Error::StsNotImplemented, cv::format("DNN/ONNX/Attribute[%s]: 'Graph' is not supported", attribute_name.c_str()));
+ }
+ else if (attribute_proto.graphs_size() > 0)
+ {
+ CV_Error(Error::StsNotImplemented,
+ cv::format("DNN/ONNX/Attribute[%s]: 'Graphs' (%d) in attributes is not supported",
+ attribute_name.c_str(), attribute_proto.graphs_size())
+ );
+ }
+ else if (attribute_proto.strings_size() > 0)
+ {
+ std::string msg = cv::format("DNN/ONNX/Attribute[%s]: 'Strings' (%d) are not supported",
+ attribute_name.c_str(), attribute_proto.strings_size());
+ CV_LOG_ERROR(NULL, msg);
+ for (int i = 0; i < attribute_proto.strings_size(); i++)
+ {
+ CV_LOG_ERROR(NULL, " Attribute[" << attribute_name << "].string(" << i << ") = '" << attribute_proto.strings(i) << "'");
+ }
+ CV_Error(Error::StsNotImplemented, msg);
+ }
+ else if (attribute_proto.tensors_size() > 0)