Open MHGL opened 3 years ago
With coremltools 6.0 and torch 1.21.1, this error is fixed.
However we get a new error due to the fact that the forward
method is not returning any value. If we update forward
to return x
, we another error: RuntimeError: PyTorch convert function for op 'setattr' not implemented.
That is caused by this line in forward
: self.output = x
. Given that MLModel
don't have state, I don't think this is something we can support.
🐞Describe the bug
torch_model -> torch.jit.script -> coreml
I got this error while try to setattr in forward.
Trace
To Reproduce
System environment (please complete the following information):