If I include BasicRecurrentLayer, GatedRecurrentLayer, etc in a net, exporting to ONNX doesn't fail, but if I try to load it with ONNX Runtime Web, the session fails to initialize.
ONNX Runtime Web doesn't throw exceptions when initializing networks that have no recurrent layers, but when there are some, it throws numbers (instead of Error objects) that don't correspond to any error codes that I have been able to look up.
I would suspect the ONNX runtime, but issues like this one in Microsoft's tracker suggest that ONNX has no way to maintain internal state in the way that recurrent networks need to do, so I wonder if Wolfram Language is exporting a valid ONNX file in the first place?
Example WL:
NetChain[
{UnitVectorLayer[], BasicRecurrentLayer[32], SequenceLastLayer[],
LinearLayer[27], SoftmaxLayer[]},
"Input" -> NetEncoder["Characters"],
"Output" ->
NetDecoder[{"Class", Characters["abcdefghijklmnopqrstuvwxyz "]}]
]
Export["lm.onnx", NetInitialize[%]]