backnotprop / fast-style-transfer-coreml

https://medium.com/@rambossa/diy-prisma-fast-style-transfer-app-with-coreml-and-tensorflow-817c3b90dacd
MIT License
113 stars 17 forks source link

Doesn't work on actual device (weird ouput) #2

Open alexiscreuzot opened 6 years ago

alexiscreuzot commented 6 years ago

So I changed the code to avoid the crash caused by trying to store every models in memory.

I get weird outputs :

img_a39ba37c5950-1 img_fd6752b6f756-1

r1cebank commented 6 years ago

There seems to be GPU implementation issue on the iOS device. https://forums.developer.apple.com/thread/97040

You can try to make the model only run on CPU but it will take way longer than expected.

let options = MLPredictionOptions()
options.usesCPUOnly = true
let outoptions.usesCPUOnly = true
let outFeatures = try! model.prediction(from: input, options:options)
r1cebank commented 6 years ago

Also could you share the work you did to fix that crash?

dneprDroid commented 5 years ago

I have similar error when model runs on GPU, my device is iPhone 8 (Apple A11 Bionic processor), iOS 12.