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

Method get_spec

coremltools/models/model.py:772–788  ·  view source on GitHub ↗

Get a deep copy of the protobuf specification of the model. Returns ------- model: Model_pb2 Protobuf specification of the model. Examples -------- .. sourcecode:: python spec = model.get_spec()

(self)

Source from the content-addressed store, hash-verified

770
771
772 def get_spec(self):
773 """
774 Get a deep copy of the protobuf specification of the model.
775
776 Returns
777 -------
778 model: Model_pb2
779 Protobuf specification of the model.
780
781 Examples
782 --------
783 .. sourcecode:: python
784
785 spec = model.get_spec()
786
787 """
788 return _deepcopy(self._spec)
789
790
791 def predict(self, data, state: _Optional[MLState] = None):

Calls

no outgoing calls