Instance normalization removed in 0.4.0

Is there a specific reason the computeMeanVar and instanceNormalization parameters were removed from the add_batchnorm method of the NeuralNetworkBuilder in the coremltools 0.4.0? I used them before in 0.3.0 and they seemed to work just fine.

When migrating to 0.4.0 I added my own helper method for creating instance normalization layers and that seem to work as before.


On a related note: it's a bit tedious that you have to provide (dummy) mean and variance values when setting computeMeanVar to True, even though they are not used.

Replies

Hi FrankSchlegel, I also notice the problem, and write a custom conversion function for instance normalization.


However, I also meet another problem: the instance normalization output is incorrect whenever it is preceded by a convolution layer. It seems you don't face the problem, so could you help me please?


I have opened another issue here: https://forums.developer.apple.com/message/241836#241836


As you don't meet this problem, could you please kindly share your protobuf if possible to help tackling this problem?

* answering you there

Hi, FrankSchlegel, We've observed some issues related to batch normalization layer when computeMeanVar and instanceNormalization parameters are set. On some devices instance normalization can give wrong predictions. We've therefore temporarily removed the two parameters from 0.4.0 release. The two parameters will be enabled again in an upcoming release. Please stay tuned!