Hello Everyone!
I’ve been working on deploying a machine learning model (Pytorch) into production (iOS), however I’m having a few obstacles I need to hurdle. I tried following the steps here (https://github.com/longcw/pytorch2caffe/ 5) to convert it to either caffe2 or ONNX (https://github.com/onnx/onnx-coreml 4), knowing the input_size is required to make a forward pass through the network.

partOne.png813×408 44.4 KB

I keep getting an error with the forward function that was from the text_encoder RNN model.


The text_encoder is a machine learning model I loaded (Followed these steps: https://stackoverflow.com/questions/42703500/best-way-to-save-a-trained-model-in-pytorch 6) from another program file I used to train on.

partFour.png842×155 21.5 KB


partFive.png956×200 18.1 KB

I’m not sure if I’m either getting the error from Dimension mis-match or not properly calling enough arguments for my forward function. Any help is greatly appreciated!