mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Remove jitted method so that our models are pickable. (#4050)
This commit is contained in:
parent
2c77842887
commit
e73595bd64
@ -33,15 +33,6 @@ if torch.__version__ < "1.4.0":
|
||||
gelu = _gelu_python
|
||||
else:
|
||||
gelu = F.gelu
|
||||
try:
|
||||
import torch_xla # noqa F401
|
||||
|
||||
logger.warning(
|
||||
"The torch_xla package was detected in the python environment. PyTorch/XLA and JIT is untested,"
|
||||
" no activation function will be traced with JIT."
|
||||
)
|
||||
except ImportError:
|
||||
gelu_new = torch.jit.script(gelu_new)
|
||||
|
||||
ACT2FN = {
|
||||
"relu": F.relu,
|
||||
|
Loading…
Reference in New Issue
Block a user