def build_text_encoder(config, *args, **kwargs): try: from mmf.modules.fb.encoders import TextEncoderFactory except ImportError: from mmf.modules.encoders import TextEncoderFactory text_encoder = TextEncoderFactory(config, *args, **kwargs) return text_encoder.module
def build_text_encoder(config, *args, **kwargs): """Deprecated, please do not use""" try: from mmf.modules.fb.encoders import TextEncoderFactory except ImportError: from mmf.modules.encoders import TextEncoderFactory text_encoder = TextEncoderFactory(config, *args, **kwargs) return text_encoder.module