coremltools icon indicating copy to clipboard operation
coremltools copied to clipboard

Conversion for op All not implemented

Open adilnaut opened this issue 7 years ago • 1 comments

There is a function - reduce all in tensorflow, which performs "Logical AND" of all elements across some dimension. Is there any way to get it working with CoreML3 other than waiting for custom layers support?

adilnaut avatar Jul 23 '19 06:07 adilnaut

Yes, you can use reduceProd layer. In CoreML, absolute of any value > 1e-6 is considered True, which makes this layer functionally similar to reduce_all.

https://github.com/apple/coremltools/blob/9f6cb1ead26b9b7dd021e3a501eba82c23fe5596/mlmodel/format/NeuralNetwork.proto#L4722

DawerG avatar Jul 23 '19 20:07 DawerG