Akshay Reddy
Akshay Reddy
@RahulBhalley have you found any solution for this? I'm stuck with this problem while trying to convert [wespeaker](https://github.com/wenet-e2e/wespeaker) model like [this](https://github.com/wenet-e2e/wespeaker/issues/302) I tried this [possible fix](https://github.com/apple/coremltools/issues/1203#issuecomment-938184162), but no luck.
@RahulBhalley I have tried the above code here. [wespeaker/bin/export_coreml.py](https://github.com/akshaydevelops/wespeaker/blob/23f598ae5ff0a8a49672c972eb505fbb8bcebb2e/wespeaker/bin/export_coreml.py) I am facing the below error ``` (wespeaker) akshayreddy@akshayreddy bin % python3 export_coreml.py --config /Users/akshayreddy/repos/source/ML/model/config.yaml --checkpoint /Users/akshayreddy/repos/source/ML/model/wespeaker.pt --output_file /Users/akshayreddy/repos/source/ML/model/wespeaker_ml.mlmodel model Loaded...
this is the assertion from the function above ```python @register_torch_op() def var(context, node): ``` ```python assert isinstance(axes, list) and all(isinstance(axis, int) for axis in axes) ```
@RahulBhalley This code works for me. ```python @register_torch_op() def var(context, node): inputs = _get_inputs(context, node, expected=4) x = inputs[0] axes = inputs[1].val keepdim = True x_mean = mb.reduce_mean(x=x, axes=axes, keep_dims=keepdim)...