def build_image_encoder(config, direct_features=False, **kwargs): from mmf.modules.encoders import ImageEncoderFactory, ImageFeatureEncoderFactory if direct_features: module = ImageFeatureEncoderFactory(config) else: module = ImageEncoderFactory(config) return module.module
def build_image_encoder(config, direct_features=False, **kwargs): """Deprecated, please do not use""" from mmf.modules.encoders import ImageEncoderFactory, ImageFeatureEncoderFactory if direct_features: module = ImageFeatureEncoderFactory(config) else: module = ImageEncoderFactory(config) return module.module