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

Method inputSchema

mlmodel/src/Model.cpp:220–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218 }
219
220 SchemaType Model::inputSchema() const {
221 SchemaType inputs;
222 const Specification::ModelDescription& interface = m_spec->description();
223 int size = interface.input_size();
224 assert(size >= 0);
225 inputs.reserve(static_cast<size_t>(size));
226 for (int i = 0; i < size; i++) {
227 const Specification::FeatureDescription &desc = interface.input(i);
228 inputs.push_back(std::make_pair(desc.name(), desc.type()));
229 }
230 return inputs;
231 }
232
233 SchemaType Model::outputSchema() const {
234 SchemaType outputs;

Callers 1

testTreeEnsembleBasicFunction · 0.80

Calls 4

descriptionMethod · 0.80
push_backMethod · 0.80
nameMethod · 0.45
typeMethod · 0.45

Tested by 1

testTreeEnsembleBasicFunction · 0.64