def export_coreml(self, filename): """ Export the model in Core ML format. Parameters ---------- filename: str A valid filename where the model can be saved. Examples -------- >>> model.export_coreml("MyModel.mlmodel") """ from turicreate.extensions import _logistic_classifier_export_as_model_asset from turicreate.toolkits import _coreml_utils display_name = "text classifier" short_description = _coreml_utils._mlmodel_short_description( display_name) context = { "class": self.__class__.__name__, "short_description": short_description, } context["user_defined"] = _coreml_utils._get_model_metadata( self.__class__.__name__, None) model = self.__proxy__["classifier"].__proxy__ _logistic_classifier_export_as_model_asset(model, filename, context)
def export_coreml(self, filename): """ Export the model in Core ML format. Parameters ---------- filename: str A valid filename where the model can be saved. Examples -------- >>> model.export_coreml("MyModel.mlmodel") """ from turicreate.extensions import _logistic_classifier_export_as_model_asset from turicreate.toolkits import _coreml_utils display_name = 'text classifier' short_description = _coreml_utils._mlmodel_short_description( display_name) context = { 'class': self.__class__.__name__, 'version': _tc.__version__, 'short_description': short_description, 'user_defined': { 'turicreate_version': _tc.__version__ } } model = self.__proxy__['classifier'].__proxy__ _logistic_classifier_export_as_model_asset(model, filename, context)
def export_coreml(self, filename): """ Export the model in Core ML format. Parameters ---------- filename: str A valid filename where the model can be saved. Examples -------- >>> model.export_coreml("MyModel.mlmodel") """ from turicreate.extensions import _logistic_classifier_export_as_model_asset from turicreate.toolkits import _coreml_utils display_name = "logistic classifier" short_description = _coreml_utils._mlmodel_short_description( display_name) context = { "class": self.__class__.__name__, "version": _turicreate.__version__, "short_description": short_description } _logistic_classifier_export_as_model_asset(self.__proxy__, filename, context)