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

Method unify

mlmodel/src/LayerShapeConstraints.cpp:516–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514}
515
516ShapeRange ShapeRange::unify(const ShapeRange& other) const {
517 ShapeRange out;
518
519 if (_minimum <= other.minimum())
520 out.setLower(_minimum);
521 else
522 out.setLower(other.minimum());
523
524 if (_maximum >= other.maximum())
525 out.setUpper(_maximum);
526 else
527 out.setUpper(other.maximum());
528
529 return out;
530}
531
532bool ShapeRange::isUnbound() const {
533 return _maximum.isUnbound();

Callers 2

shapeBroadcastLayerMethod · 0.80
testShapeRangeFunction · 0.80

Calls 4

minimumMethod · 0.80
setLowerMethod · 0.80
maximumMethod · 0.80
setUpperMethod · 0.80

Tested by 1

testShapeRangeFunction · 0.64