Remove side effects of disabling gradient computaiton (#13257)

This commit is contained in:
Lysandre Debut 2021-08-25 11:32:51 +02:00 committed by GitHub
parent b1198a8440
commit 0e4f727069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,6 +127,7 @@ def export(
)
config.restore_ops()
torch.set_grad_enabled(False)
return matched_inputs, onnx_outputs