File size: 795 Bytes
88597ff | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | '''
-----------------------------------------------------------------------------
Copyright (c) 2023, ai-study-room. All rights reserved.
Authors: freesky-edward
This source code or documentation is under the license under the
LICENSE file in the root directory of this repository
-----------------------------------------------------------------------------
'''
import importlib
def get_inference(cfg):
r"""
load the give inference base on the configuration.
the default inferences locats under models directory
and each model will:
1). inhirted from BaseInference
2). provide a config file under its own root directory.
"""
inference_lib = importlib.import_module(cfg.inference.type)
inference = inference_lib.Inference(cfg)
return inference
|