File size: 418 Bytes
29f689c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
__all__ = ['build_transform']


def build_transform(config):
    from .aster_tps import Aster_TPS
    from .moran import MORN
    from .tps import TPS

    support_dict = ['TPS', 'Aster_TPS', 'MORN']

    module_name = config.pop('name')
    assert module_name in support_dict, Exception(
        'transform only support {}'.format(support_dict))
    module_class = eval(module_name)(**config)
    return module_class