Posts

Post not yet marked as solved
1 Replies
872 Views
I added a custom layer to the end of a neural network that produces two outputs with the same shape [512].However, when I try to load the model, I get a EXC_BAD_ACCESS with a huge stacktrace (see below). It looks like an endless recursion.When I rewrite the spec and the layer to produce only one output with shape [512, 1, 2] it works, but I'm running into alignment issues later.Is this a bug in Core ML or am I doeing something wrong?#0 __memcpy_chk () #1 io_connect_method () #2 IOConnectCallMethod () #3 IOAccelResourceCreate () #4 -[MTLIOAccelResource initWithDevice:options:args:argsSize:] () #5 -[MTLIOAccelHeap initWithDevice:size:options:args:argsSize:] () #6 ___lldb_unnamed_symbol1064$$AGXMetalA11 () #7 -[MTLDebugDevice newHeapWithDescriptor:] () #8 Espresso::MPSEngine::blob_container::resize(int, int, int, int, int, std::__1::shared_ptr<Espresso::abstract_blob_container_options>) () #9 Espresso::shape_network(Espresso::net*, Espresso::network_shape const&) () #10 Espresso::shape_network(Espresso::net*, Espresso::network_shape const&) () #11 Espresso::shape_network(Espresso::net*, Espresso::network_shape const&) () ... #1571 Espresso::shape_network(Espresso::net*, Espresso::network_shape const&) () #1572 Espresso::shape_network(Espresso::net*, Espresso::network_shape const&) () #1573 Espresso::shape_network(Espresso::net*, Espresso::network_shape const&) () #1574 Espresso::shape_network(std::__1::shared_ptr<Espresso::net>, std::__1::basic_istream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) () #1575 Espresso::load_network(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<Espresso::abstract_context> const&, Espresso::compute_path) () #1576 EspressoLight::espresso_plan::add_network(char const*, espresso_storage_type_t) () #1577 espresso_plan_add_network () #1578 -[MLNeuralNetworkEngine _setupContextAndPlanWithForceCPU:error:] () #1579 -[MLNeuralNetworkEngine initWithSpec:classScoreVectorName:classLabels:forceCPU:error:] () #1580 -[MLNeuralNetworkEngine initWithSpec:classScoreVectorName:classLabels:error:] () #1581 +[MLNeuralNetworkEngine loadModelFromCompiledArchive:modelVersionInfo:compilerVersionInfo:error:] () #1582 +[MLLoader loadModelFromArchive:error:] () #1583 +[MLLoader loadModelFromAssetAtURL:error:] () #1584 -[MLModelAsset load:] () #1585 -[MLModelAsset modelWithError:] () #1586 +[MLModel modelWithContentsOfURL:error:] () #1587 @nonobjc MLModel.__allocating_init(contentsOf:) () #1588 MyModel.init(contentsOf:) #1589 MyModel.init()
Posted Last updated
.
Post not yet marked as solved
1 Replies
561 Views
Right now, compiled CoreML models are represented as folders in the app's bundle. They contain not only binary files (two with the same name ), but also plain text files describing the model topology. That means everybody could unzip the IPA of your app, extract your model(s) and either reconstruct it or use it as it is in their own app.For a lot of apps this is probably not an issue because they use openly available models. But for some developers the models are their business logic.Is there any way to not expose that logic so openly?
Posted Last updated
.
Post not yet marked as solved
0 Replies
436 Views
With iOS 11 developers are able to write custom Core Image filters directly in Metal. However, according to the WWDC session about the topic, this feature is only available on devices with A8 or newer. So I guess the device's MTLFeatureSet must be GPU Family 2 or 3 in the corresponding iOS 11 version.When I now decide to build a filter pipeline for a new app based on Metal shaders, how am I able to restrict its installation to supported devices? As far as I can tell one can only specify that Metal needs to be supported, but that includes GPU Family 1 devices as well. Is the common "This app only support X devices" disclaimer in the app's description really the only option?(The same applies for Metal Performance Shaders and any other features that are only available on newer devices.)
Posted Last updated
.