mirror of
https://github.com/facebookresearch/fairseq.git
synced 2024-11-11 03:31:32 +03:00
make apex optional (#4906)
This commit is contained in:
parent
902f4aa5e8
commit
c19aed8ef5
@ -21,7 +21,11 @@ from fairseq.dataclass import FairseqDataclass
|
||||
from fairseq.models import BaseFairseqModel, register_model
|
||||
from fairseq.models.wav2vec.wav2vec2 import TransformerSentenceEncoderLayer
|
||||
|
||||
from apex.normalization import FusedLayerNorm
|
||||
try:
|
||||
from apex.normalization import FusedLayerNorm
|
||||
except:
|
||||
FusedLayerNorm = nn.LayerNorm
|
||||
|
||||
import torch.nn.functional as F
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user