Post

Replies

Boosts

Views

Activity

Reply to [Create ML Components] The transformer is not representable as a CoreML model (ImageReader).
Somehow got it to export by composing the transformer explicitly, which gave a ComposedTransformer<ImageFeaturePrint, FullyConnectedNetworkMultiLabelClassifierModel>, so I'm guessing the chaining used in the documentation was never attempted to export since return type is invalid let annotatedFeatures = detectionFiles.map { AnnotatedFeature( feature: directoryURL.appending(component: $0.filename), annotation: $0.labels ) } let reader = ImageReader() let (training, validation) = annotatedFeatures.randomSplit(by: 0.8) let featurePrint = ImageFeaturePrint(revision: 2) let classifier = FullyConnectedNetworkMultiLabelClassifier<Float, String>(labels: labels) let task = featurePrint.appending(classifier) Task { let trainingImages = try await reader.applied(to: training) let validationImages = try await reader.applied(to: validation) let model = try await task.fitted( to: trainingImages, validateOn: validationImages, eventHandler: { event in debugPrint(event) } ) try! model.export(to: modelFile) }
Sep ’23
Reply to Create ML Multi-Label Image Classifier will not train, throws error: "Unexpected Error"
I'm getting a failure on export using the exact transformer used in this guide https://developer.apple.com/documentation/createml/creating-a-multi-label-image-classifier ComposedTransformer<ComposedTransformer<ImageReader, ImageFeaturePrint>, FullyConnectedNetworkMultiLabelClassifierModel> The transformer is not representable as a CoreML model (ImageReader). I'm guessing this is just a misleading error? In this intro with no runnable examples https://developer.apple.com/videos/play/wwdc2022/10019/ also noticed this line try estimator.write(transformer, to: parametersURL) which writes a .pkg file which I'm guessing is for instantiating the estimator
Sep ’23
Reply to USDZ Tools on Apple Silicon
So the official toolchain showcased https://developer.apple.com/augmented-reality/tools/ and all over RealityKit, requires x86_64 prebuilt and 3.7.9, even further backwards from shipped system /usr/bin/python3? Apple should donate some hardware to whoever is maintaining the dependency that is preventing dogfooding on flagship hardware
Topic: Graphics & Games SubTopic: General Tags:
May ’23
Reply to [Create ML Components] The transformer is not representable as a CoreML model (ImageReader).
Somehow got it to export by composing the transformer explicitly, which gave a ComposedTransformer<ImageFeaturePrint, FullyConnectedNetworkMultiLabelClassifierModel>, so I'm guessing the chaining used in the documentation was never attempted to export since return type is invalid let annotatedFeatures = detectionFiles.map { AnnotatedFeature( feature: directoryURL.appending(component: $0.filename), annotation: $0.labels ) } let reader = ImageReader() let (training, validation) = annotatedFeatures.randomSplit(by: 0.8) let featurePrint = ImageFeaturePrint(revision: 2) let classifier = FullyConnectedNetworkMultiLabelClassifier<Float, String>(labels: labels) let task = featurePrint.appending(classifier) Task { let trainingImages = try await reader.applied(to: training) let validationImages = try await reader.applied(to: validation) let model = try await task.fitted( to: trainingImages, validateOn: validationImages, eventHandler: { event in debugPrint(event) } ) try! model.export(to: modelFile) }
Replies
Boosts
Views
Activity
Sep ’23
Reply to Create ML Multi-Label Image Classifier will not train, throws error: "Unexpected Error"
I'm getting a failure on export using the exact transformer used in this guide https://developer.apple.com/documentation/createml/creating-a-multi-label-image-classifier ComposedTransformer<ComposedTransformer<ImageReader, ImageFeaturePrint>, FullyConnectedNetworkMultiLabelClassifierModel> The transformer is not representable as a CoreML model (ImageReader). I'm guessing this is just a misleading error? In this intro with no runnable examples https://developer.apple.com/videos/play/wwdc2022/10019/ also noticed this line try estimator.write(transformer, to: parametersURL) which writes a .pkg file which I'm guessing is for instantiating the estimator
Replies
Boosts
Views
Activity
Sep ’23
Reply to USDZ Tools on Apple Silicon
So the official toolchain showcased https://developer.apple.com/augmented-reality/tools/ and all over RealityKit, requires x86_64 prebuilt and 3.7.9, even further backwards from shipped system /usr/bin/python3? Apple should donate some hardware to whoever is maintaining the dependency that is preventing dogfooding on flagship hardware
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’23