Toby Roseman

Results 543 comments of Toby Roseman

Sending us a PR would be great. Please include [a unit test](https://github.com/apple/coremltools/blob/d7c1e53d0e717d633f7dfc7e0f65f6468e503db1/coremltools/converters/mil/frontend/torch/test/test_torch_ops.py#L1216-L1241).

In order to support `torch.linalg.lstsq` it needs to be implemented using [our MIL ops](https://apple.github.io/coremltools/source/coremltools.converters.mil.mil.ops.defs.html). Looking at [the documentation for that PyTorch op](https://pytorch.org/docs/stable/generated/torch.linalg.lstsq.html), I think it's not going to be possible...

@YifanShenSZ - we don't have any MIL ops like that. However, let's leave this issue open since it is not resolved.

@dhruvmk - By all means, feel free to work on this issue. However as I said before, I don't think this is currently going to be possible, given the MIL...

@Moeflon - Please create a new GitHub issue with steps to reproduce your problem that was solved by downgrading coremltools.

Since you're already using the `classifier_config` parameter, I wouldn't expect the `outputs` parameter to help you here. However it's probably worth a try. Are you sure your `class_ids` is correct?...

Yeah, something is wrong here. Looking at [the code around the assertion](https://github.com/apple/coremltools/blob/76963a6994cb9b30c15b7039d50e8921e1736305/coremltools/converters/mil/mil/ops/defs/iOS15/classify.py#L71), `self.probabilities.shape` is `(1, 8400, 64)` while `len(self.classes.val)` is `20`.

@bigppwong - I'm not able to run your code. `traced_model` is not defined.

Based on the error message, it seems you are trying to use an input with a different shape than what the model was traced with. This means you need to...

Yes, flexible input shapes require limits. This is a requirement of the Core ML Framework. I'm not familiar enough with PyTorch Lighting export to compare.