MCPcopy Create free account
hub / github.com/apple/coremltools / nonMaxSuppressionUsesFloat32InputsOrOutputs

Function nonMaxSuppressionUsesFloat32InputsOrOutputs

mlmodel/src/Utils.cpp:564–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

562}
563
564static bool nonMaxSuppressionUsesFloat32InputsOrOutputs(const Specification::Model& model) {
565 if (!isNonMaxSuppression(model)) {
566 // not NMS.
567 return false;
568 }
569
570 return anyFeatureDescriptionOfModel(
571 model,
572 [](const auto& fd) {
573 return
574 (fd.type().Type_case() == Specification::FeatureType::kMultiArrayType) &&
575 (fd.type().multiarraytype().datatype() == Specification::ArrayFeatureType_ArrayDataType_FLOAT32);
576 });
577}
578
579bool CoreML::hasIOS14Features(const Specification::Model& model) {
580 // New IOS14 features:

Callers 1

hasIOS14FeaturesMethod · 0.85

Calls 3

isNonMaxSuppressionFunction · 0.85
typeMethod · 0.45

Tested by

no test coverage detected