RuntimeError: unexpected tensor scalar type

I am getting an error saying RuntimeError: unexpected tensor scalar type while exporting my pytorch model to ONNX:

Could someone tell me what I’m missing here?
Thanks!

The error could be raised e.g. in these lines of code which would point to an unknown dtype. Which dtypes are you using in your workflow and could you check, if this dtype is not in the supported list?