Toby Roseman

Results 543 comments of Toby Roseman

I'd also recommend watching this WWDC talk: https://developer.apple.com/videos/play/wwdc2021/10038/

We only have "expiremental" support for PyTorch models which have not been created by `torch.jit.trace`.

@the-neural-networker - the following works for me: ```python import numpy as np import torch import torch.nn as nn import coremltools as ct def experiment(val: torch.Tensor): val = int(val.item()) result =...

This example will give the wrong prediction when the input is not `100`. However that is a result of the tracing not the conversion to Core ML. The PyTorch traced...

Can you share simple standalone code to reproduce the issue? This sounds like it's an issue with the Core ML Framework, not the coremltools python package. If it's a problem...

Can you give us steps to reproduce this issue?

I can reproduce this issue. This works if you don't use flexible shaped input, i.e. this works: ```python model = ct.convert( traced_model, convert_to="mlprogram", inputs=[ct.ImageType(shape=inputs["pixel_values"].shape)] ) ``` When flexible shapes are...

@saad-palapa - that would be very helpful. I suggest you take a look at [our Contribution Guidelines](https://github.com/apple/coremltools/blob/main/CONTRIBUTING.md) and [our doc about Building from Source](https://github.com/apple/coremltools/blob/main/BUILDING.md).

I agree. This is something we'll need to address before we can support Python 3.12. Our only usage of `imp` is in [setup.py](https://github.com/apple/coremltools/blob/7f1916a962b296a31448f8c08d449bd352037a48/setup.py#L14). We are only using `load_source` from `imp`....

@hugovk - yes, this is very helpful. Thank you.