Toby Roseman

Results 543 comments of Toby Roseman

It looks like you are using a torch script model. Our support for torch script is experimental. Can you try tracing your model, then try converting the traced model?

We do have a [MIL op for `random_bernoulli`](https://apple.github.io/coremltools/source/coremltools.converters.mil.mil.ops.defs.html#coremltools.converters.mil.mil.ops.defs.iOS15.random.random_bernoulli). However it not clear to me how to use that to replicate the behavior of [torch.Tensor.bernoulli_](https://pytorch.org/docs/stable/generated/torch.Tensor.bernoulli_.html#torch-tensor-bernoulli).

@Sehaba95 - are you calling `.eval()` on your PyTorch model before you call `coremltools.convert(...)`? I believe that may solve this issue.

> Is there a custom op implementation that we can use in the meantime? I don't think so. You could try creating your own [composite operators](https://coremltools.readme.io/docs/composite-operators). We'd welcome any pull...

Sorry @SaulAryehKohn I don't have any insights here. Have to tried unit testing your code in order to verify correctness? We have lots of example of unit testing Torch ops...

Please provide the complete output (i.e. the full stack trace). Also please give us complete code to reproduce the issue. How do I execute this line: `net = U2NETP(3,1)`?

The CI system has been rebuilt. It is currently passing.

Is this still an issue on the latest version macOS?

@daverumph - please zip the ml model and share it in this issue.