Posts

Post marked as solved
3 Replies
426 Views
Hi I have been the following WWDC21 "dynamic training on iOS" - I have been able to get the training working, with an output of the iterations etc being printed out in the console as training progresses. However I am unable to retrieve the checkpoints or result/model once training has completed (or is in progress) nothing in the callback fires. If I try to create a model from the sessionDirectory - it returns nil (even though training has clearly completed). Please can someone help or provide pointers on how to access the results/checkpoints so that I can make a MlModel and use it. var subscriptions = [AnyCancellable]()         let job = try! MLStyleTransfer.train(trainingData: datasource, parameters: trainingParameters, sessionParameters: sessionParameters) job.result.sink { result in             print("result ", result)         }         receiveValue: { model in try? model.write(to: sessionDirectory)             let compiledURL = try? MLModel.compileModel(at: sessionDirectory)             let mlModel = try? MLModel(contentsOf: compiledURL!)         }         .store(in: &subscriptions) This also does not work: job.checkpoints.sink { checkpoint in // Process checkpoint  let model = MLStyleTransfer(trainingData: checkpoint) } .store(in: &subscriptions)         } This is the printout in the console: Using CPU to create model +--------------+--------------+--------------+--------------+--------------+ | Iteration    | Total Loss   | Style Loss   | Content Loss | Elapsed Time | +--------------+--------------+--------------+--------------+--------------+ | 1            | 64.9218      | 54.9499      | 9.97187      | 3.92s        | 2022-02-20 15:14:37.056251+0000 DynamicStyle[81737:9175431] [ServicesDaemonManager] interruptionHandler is called. -[FontServicesDaemonManager connection]_block_invoke | 2            | 61.7283      | 24.6832      | 8.30343      | 9.87s        | | 3            | 59.5098      | 27.7834      | 11.7603      | 16.19s       | | 4            | 56.2737      | 16.163       | 10.985       | 22.35s       | | 5            | 53.0747      | 12.2062      | 12.0783      | 28.08s       | +--------------+--------------+--------------+--------------+--------------+ Any help would be appreciated on how to retrieve models. Thanks
Posted
by Saddif.
Last updated
.
Post not yet marked as solved
1 Replies
361 Views
Hi, is it possible to get the code for the demo app used in this presentation for the dynamic style transfer example please? thanks
Posted
by Saddif.
Last updated
.
Post not yet marked as solved
1 Replies
463 Views
Hi just a couple of questions about the new style transfer in Create ML. Does it use the same methods/underlying models as Turicreate to do the style transfer? Turicreate lets you use up to 8 styles at once (thus reducing the size of the produced MLmodel) i.e. you don''t need to create a MlModel for each style. Does the new CreateML style transfer have the same ability? Thanks
Posted
by Saddif.
Last updated
.