(config)
| 2 | |
| 3 | |
| 4 | def build_transform(config): |
| 5 | from .aster_tps import Aster_TPS |
| 6 | from .moran import MORN |
| 7 | from .tps import TPS |
| 8 | |
| 9 | support_dict = ['TPS', 'Aster_TPS', 'MORN'] |
| 10 | |
| 11 | module_name = config.pop('name') |
| 12 | assert module_name in support_dict, Exception( |
| 13 | 'transform only support {}'.format(support_dict)) |
| 14 | module_class = eval(module_name)(**config) |
| 15 | return module_class |