M_noAria

Results 9 comments of M_noAria

First, add `var window: UIWindow?` in AppDelegate. Then, in SceneDelegate ( find or create window ): ``` func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let...

The tensorflow provides an api to convert .pb file into .tflite file. It can run in the iPhone/Simulator. ``` from tensorflow.python.framework import graph_util import tensorflow as tf graph_def_file = "/xxxxxxxxxxx/ts-flz.pb"...

You can replace `shape[0]` with ```python bs = x.size(0) ```` Note that the output of `torch.randn` will be fixed after the conversion. As a personal recommendation, it might be better...

I'll try splitting the model into two parts: ```Python class ShapeModel(nn.Module): def forward(self, input1: torch.Tensor, input2: torch.Tensor): processed = input1 + input2 @torch.jit.script_if_tracing def _shape(input1, input2): return torch.LongTensor([input1.size(0), input2.size(1)]).squeeze() return...

You can try running it in an x86 Docker container.

I tend to use ``` github.com/go-python/cpy3/v8 github.com/go-python/cpy3/v9 ``` for `3.8` or `3.9`

```Python def _construct_matmul(x: Var, y: Var, name: Optional[str] = None) -> Var: if (len(y.shape) == 2 and len(x.shape)

@TobyRoseman Using `mb.matmul` may avoid this RuntimeError. But other unit tests will fail in torch 2.8.0. The CI won't be green. \_(ˊཀˋ」∠)_ For example: ```sh pytest --disable-warnings -x coremltools/converters/mil/frontend/torch/test/test_torch_ops.py::TestIndexPut::test_index_put_negative_indices_case_2 pytest...

For this issue: Use `mb.matmul`: ```Python @register_torch_op(torch_alias=["bmm", "mm"]) def matmul(context, node): x, y = _get_inputs(context, node, expected=2) x, y = promote_input_dtypes([x, y]) res = mb.matmul(x=x, y=y, name=node.name) context.add(res) ``` This...