Closed captain81 closed 3 years ago
Hi, I’m trying to convert a pytorch model to onnx, but the conversion gives the following error:
RuntimeError: ONNX export failed: Couldn’t export Python operator qfn
The definition for qfn is:
class qfn(torch.autograd.Function): @staticmethod def forward(ctx, input, k): n = float(2*k - 1) out = torch.round(input n) / n return out
@staticmethod def backward(ctx, grad_output): grad_input = grad_output.clone() return grad_input, None
Sounds like you are using torch.onnx.export? Please file an issue in https://github.com/pytorch/pytorch
Hi, I’m trying to convert a pytorch model to onnx, but the conversion gives the following error:
RuntimeError: ONNX export failed: Couldn’t export Python operator qfn
The definition for qfn is:
class qfn(torch.autograd.Function): @staticmethod def forward(ctx, input, k): n = float(2*k - 1) out = torch.round(input n) / n return out
@staticmethod def backward(ctx, grad_output): grad_input = grad_output.clone() return grad_input, None