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

Function testStateFeatureDescriptionInInputs

mlmodel/tests/InterfaceTests.cpp:414–425  ·  view source on GitHub ↗

For backward compabitility reason, it is OK to declare state features in the input descriptions.

Source from the content-addressed store, hash-verified

412
413/// For backward compabitility reason, it is OK to declare state features in the input descriptions.
414int testStateFeatureDescriptionInInputs() {
415 Specification::Model m;
416 auto *description = m.mutable_description();
417
418 setupStateFeature(description->add_input(), "x");
419
420 // Check model specification version requirements.
421 auto validationPolicy = validationPolicyForStateTests();
422 ML_ASSERT_GOOD(validateModelDescription(*description, MLMODEL_SPECIFICATION_VERSION_NEWEST, validationPolicy));
423
424 return 0;
425}
426
427int testStateFeatureIsNotFP16_shouldFail() {
428 Specification::Model m;

Callers

nothing calls this directly

Calls 3

setupStateFeatureFunction · 0.85
validateModelDescriptionFunction · 0.85

Tested by

no test coverage detected