Posts

Post not yet marked as solved
4 Replies
966 Views
Hello.I have the follow problem:I have the converted from Caffe(with deconvolutional layer) model which work correct if I run it with python and coremltools. But if I try to load it on Iphone the loader return assertation error:/BuildRoot/Library/Caches/com.apple.xbs/Sources/MetalImage/MetalImage-82.1/MPSNeuralNetwork/Filters/MPSCNNConvolutionTranspose.mm:207: failed assertion `number of groups must be > 0'I now that nGroups correct (=2)Caffe section:layer { name: "upscore" type: "Deconvolution" bottom: "conv10_new" top: "upscore" param { lr_mult: 0 decay_mult: 0 } convolution_param { num_output: 2 bias_term: false pad: 16 kernel_size: 64 group: 2 stride: 32 weight_filler { type: "bilinear" } } }Mlmodel spec section: layers { name: "upscore" input: "conv10_new" output: "upscore" convolution { outputChannels: 2 kernelChannels: 1 nGroups: 2 kernelSize: 64 kernelSize: 64 stride: 32 stride: 32 dilationFactor: 1 dilationFactor: 1 valid { paddingAmounts { borderAmounts { startEdgeSize: 16 endEdgeSize: 16 } borderAmounts { startEdgeSize: 16 endEdgeSize: 16 } } } isDeconvolution: true weights {Any ideas?Thanks!PS. coremltools convert Caffe deconvolution layer not totally correct, it needed to swap outputChannels and kernelChannels (reshape weights in caffe model). For example in this sample caffe model has weights shape (2, 1, 64, 64) but coremltools expect (1, 2, 64, 64)
Posted
by mikhail_p.
Last updated
.
Post not yet marked as solved
0 Replies
468 Views
Hi,Did not find documentation on this:CMSensorRecorder.isAccelerometerRecordingAvailable()It is true on iPhone XR but false on iPhone SE and 6s plus.As I understand it works only on >=A10. Is not it?Thank you.
Posted
by mikhail_p.
Last updated
.
Post not yet marked as solved
4 Replies
693 Views
I wrote about problem /thread/86102#256651when after use 0.6.2/3 version my mlmodel became 2x slowerSolution: remove "hint_fallback_from_metal" from deconvolution layer description.
Posted
by mikhail_p.
Last updated
.
Post not yet marked as solved
2 Replies
479 Views
Good dayI have error when trying to convert with coremltools eltwise layer with coeffs in eltwise_param section:layer { name: "eltwout" type: "Eltwise" bottom: "ch31" bottom: "poolout" top: "diff" eltwise_param { operation: SUM coeff: 1 coeff: -1 } }RuntimeError: Unsupported parameter 'coeff' in caffe layer 'eltwout' of type 'Elementwise'.Any ideas?Thanks!
Posted
by mikhail_p.
Last updated
.