coremltools icon indicating copy to clipboard operation
coremltools copied to clipboard

Updatable neural network classifier docs example not working

Open nicknikolov opened this issue 2 years ago • 2 comments

Hello,

this is a follow up on my other issue (https://github.com/apple/coremltools/issues/1705) about trying to make an updatable model using PyTorch conversions. I'm making a separate but related issue for the given example in the documentation which uses PyTorch.

https://coremltools.readme.io/docs/updatable-neural-network-classifier-on-mnist-dataset

Running the example code given in the documentations gives different results and has two separate issues.

The first one is similar to my PyTorch issue where the softmax is converted as softmaxND because the rank is 2 instead of 3.

Then another difference is that the final layers of the model come out as type batchedMatmul instead of innerProduct where only an innerProduct layer is updatable.

Here's how the same model from the example looks for me. Screenshot 2023-01-30 at 14 15 05

I wonder if this is being caused by some kind of version mismatch or the documentation is outdated? My use-case is using PyTorch but perhaps understanding why the provided Tensorflow example doesn't work would be a good start for me to understand how to fix it.

Thanks

nicknikolov avatar Jan 30 '23 14:01 nicknikolov

I have the same issue/question, would be great to get an answer here

carmenberndt avatar Feb 09 '23 17:02 carmenberndt

same issue for me.

faizankarim avatar Sep 04 '23 10:09 faizankarim