apple / apple/coremltools

Updatable neural network classifier docs example not working

Open
#1,749 2 comments 6 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
5.4k
Forks
850
Avg merge
4d 5h
Merged PRs (30d)
10

Description

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

Contributor guide

Open the contributing guide

Research direction

Start with the updatable neural network classifier on MNIST documentation example and run its provided code using the reported setup. Compare the generated softmax and final layer types with the documented result, then determine whether the example or its explanation needs updating; done means the example is reproducible or its version-dependent behavior is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch, tensorflow
Domain
documentation, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.