Closed matthewchung74 closed 3 years ago
Neither of the links work for me. Please share standalone code here that reproduces the issue.
Hi Toby, sorry about that. The notebook is from the apple readme https://coremltools.readme.io/docs/what-are-coreml-tools and clicking on the binder link. Then I selected the pytorch notebook. I just tried from the readme page and can load the notebook.
Just to follow up on this. The scale factor comes from the documentation for MobileNet v2 model on PyTorch Hub:
https://pytorch.org/hub/pytorch_vision_mobilenet_v2/
The actual scale factor they recommend [0.229, 0.224, 0.225]
for the RGB channels, but coremltools doesn't have a way to apply independent scaling to each color channel.
oh ic. thank you.
❓Question
I'm looking at these two examples for pytorch and tf, from the coreml website.
https://notebooks.gesis.org/binder/jupyter/user/continuumio-coreml-demo-a8q331jt/notebooks/tensorflow2.ipynb
for this, can you explain where the
scale
andbasis
value comes from?https://notebooks.gesis.org/binder/jupyter/user/continuumio-coreml-demo-a8q331jt/notebooks/pytorch.ipynb
and here can you explain where the
scale
andbias
values comes from? Specifically, why is the scale divided by .226 after being converted from 0 to 1? for the bias numbers, I can see the numerators are the channel means but why divide by .226?