Thx Stellar!
I followed that one... but unfortunately I was not able to export my trained model.
That is so weird...
It worked until these lines:
// Export to Core ML
let modelURL = URL(filePath: "/path/to/model")
try model.export(to: modelURL)
And then it throws:
Error loading JSON data: The transformer is not representable as a CoreML model (ImageReader).