When I use
torch.onnx.export to export my model to an onnx, it shows error,
Exporting the operator amax to Exporting the operator amax to ONNX opset version 11 is not supported.
I know when pip install a new version of torch(1.12.0) it can be solves this problem,
However, due to some reason, my torch version must be fixed(detectron2 0.6 can only worked in torch 1.10), so is it possible to only add part of code in old version torch to make it work?
In detail, I found this part in new ver pytorch
(site_packages/torch/onnx/symbolic_opset9.py), @_onnx_symbolic("aten::amax") @symbolic_helper.quantized_args(True) @symbolic_helper.parse_args("v", "is", "i") @_beartype.beartype def amax(g: jit_utils.GraphContext, self, dim, keepdim): return g.op("ReduceMax", self, axes_i=dim, keepdims_i=keepdim)
I was wondering if I can copy/paste corrsponding code into old version…