Variance doesn’t seems to be an ONNX operator. But hopefully, it can be expressed as a combination of simpler operations.

One way to “bypass” it is to remove your call to “var” and replace by its formula.
A better approach is to add to torch.onnx the var export (I could do it if I get some free time this evening).
Ideally, if its usage is common, it would be interesting to open an issue on the ONNX Repo to ask for a Variance opcode that could be added to the standard.

Do you know how many models use this operator? I never had to use it before personally. 

PS: The variance can be expressed as  31