Bug in slice after permute

Hi everyone.


There is strange behaviour in slicing channels after permute(1,0,2,3).


https://gist.github.com/anonymous/a711f7dcf8d51492c39ad623246f31c5


It fails when I'm trying to import it via python


mlmodel = coremltools.models.MLModel('caffe/output.mlmodel')


with message:


compiler error: Invalid slice end=2 start=1 dim=0


In my opinion it is a bug because it works well if:

- there are no permutes

- OR beginindex is set to 0 (but this option doesn't meet my reqs)


Is it a bug in CoreML or am I making something wrong?