You might be ignoring a warning raised here, which explains:

UserWarning: You are exporting the model in training mode with onnx opset version 11. Opset versions lower than opset 12 will not be able to export nodes such as Dropout and BatchNorm correctly.