Open dzhelonkin opened 2 years ago
@dzhelonkin - Your first code segment works for me using the most recent version of coremltools. Please try again with the latest version of coremltools. If you still get the error, let us know more information about your environment, such as your version of PyTorch.
@TobyRoseman First code segment is working as expected (LSTM, not LSTMCell). The feature request is to add support for LSTMCell conversion from PyTorch (second segment, it is not working). LSTM is not LSTMCell in for/while loop in PyTorch (LSTM and LSTMCell implementations are separated). As a result additional functionality is required.
Environment: torch 1.10.0 coremltools 5.1.0
🌱 Describe your Feature Request
Adding conversion support from PyTorch not only for LSTM, but also for LSTMCell. At least
unsafe_chunk
op support is required.Use cases
LSTMCell is needed for streaming(online) processing on device . For example it will be useful for speech processing or any other time series.
Describe alternatives you've considered
Conversion PyTorch->ONNX->CoreML is working, but ONNX->CoreML will be deprecated.
Additional context
Working LSTM conversion
Failed conversion of LSTMCell with error
PyTorch convert function for op 'unsafe_chunk' not implemented.