예제 #1
0
파일: build.py 프로젝트: salanueva/mmf
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
예제 #2
0
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