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

Method hasCustomLayer

mlmodel/src/Utils.cpp:159–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159bool CoreML::hasCustomLayer(const Specification::Model& model) {
160 return walkModelAndPipeline(
161 model,
162 [](const auto& m) {
163 if (const auto *layers = getNNSpec(m)) {
164 for (const auto& layer: *layers) {
165 if (layer.layer_case() == Specification::NeuralNetworkLayer::kCustom) {
166 return true;
167 }
168 }
169 }
170 return false;
171 });
172}
173
174std::vector<StringPair> CoreML::getCustomLayerNamesAndDescriptions(const Specification::Model& model) {
175 std::vector<std::pair<std::string, std::string> > retval;

Callers

nothing calls this directly

Calls 1

walkModelAndPipelineFunction · 0.85

Tested by

no test coverage detected