Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

#1068 Added CoreML export notebook & method for Apple devices.

Merged
Ghost merged 1 commits into Deci-AI:master from deci-ai:feature/SG-000_add_coreml_export_model
@@ -15,6 +15,7 @@ class TestModelsONNXExport(unittest.TestCase):
         with tempfile.TemporaryDirectory() as tmpdirname:
         with tempfile.TemporaryDirectory() as tmpdirname:
             out_path = os.path.join(tmpdirname, "resnet18.onnx")
             out_path = os.path.join(tmpdirname, "resnet18.onnx")
             models.convert_to_onnx(model=pretrained_model, out_path=out_path, input_shape=(3, 256, 256), pre_process=preprocess)
             models.convert_to_onnx(model=pretrained_model, out_path=out_path, input_shape=(3, 256, 256), pre_process=preprocess)
+            self.assertTrue(os.path.exists(out_path))
 
 
     def test_models_onnx_export(self):
     def test_models_onnx_export(self):
         pretrained_model = models.get(Models.RESNET18, num_classes=1000, pretrained_weights="imagenet")
         pretrained_model = models.get(Models.RESNET18, num_classes=1000, pretrained_weights="imagenet")
@@ -24,6 +25,7 @@ class TestModelsONNXExport(unittest.TestCase):
             models.convert_to_onnx(
             models.convert_to_onnx(
                 model=pretrained_model, out_path=out_path, pre_process=preprocess, prep_model_for_conversion_kwargs=dict(input_size=(1, 3, 640, 640))
                 model=pretrained_model, out_path=out_path, pre_process=preprocess, prep_model_for_conversion_kwargs=dict(input_size=(1, 3, 640, 640))
             )
             )
+            self.assertTrue(os.path.exists(out_path))
 
 
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":
Discard
Tip!

Press p or to see the previous file or, n or to see the next file