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

Function hasEmptyInput

mlmodel/src/Utils.cpp:1009–1029  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1007}
1008
1009static bool hasEmptyInput(const Specification::Model& model) {
1010 return walkModelAndPipeline(
1011 model,
1012 [](const Specification::Model& m) {
1013 const auto& modelDescription = m.description();
1014 if (modelDescription.functions_size() == 0) {
1015 // A single function syntax
1016 if (modelDescription.input_size() == 0) {
1017 return true;
1018 }
1019 } else {
1020 // A multi function syntax
1021 for (const auto& functionDescription: modelDescription.functions()) {
1022 if (functionDescription.input_size() == 0) {
1023 return true;
1024 }
1025 }
1026 }
1027 return false;
1028 });
1029}

Callers 1

hasIOS18FeaturesMethod · 0.85

Calls 2

walkModelAndPipelineFunction · 0.85
descriptionMethod · 0.80

Tested by

no test coverage detected