Pytorch example gives error. (Sub-class of torch.autograd.Function to ONNX)

I am trying to convert a custom function to ONNX that is a subclass of torch.autograd.Function. When I try to run the example provided here (torch.onnx — PyTorch 1.11.0 documentation), I get this error

IndexError: Invalid attribute specifier 'min' names  must be suffixed with type, e.g. 'dim_i' or 'dims_i'

Any ideas how to make it work?
Thank you.