mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Remove side effects of disabling gradient computaiton (#13257)
This commit is contained in:
parent
b1198a8440
commit
0e4f727069
@ -127,6 +127,7 @@ def export(
|
||||
)
|
||||
|
||||
config.restore_ops()
|
||||
torch.set_grad_enabled(False)
|
||||
|
||||
return matched_inputs, onnx_outputs
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user