image_through_model #49
@@ -1,2 +1,3 @@
|
||||
from .get_class import get_class
|
||||
from .load_model import DEVICE, load_model
|
||||
from .vcda_dataset import VCDADataset
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
from importlib import import_module
|
||||
from types import ModuleType
|
||||
|
||||
|
||||
def get_class(path: str) -> ModuleType:
|
||||
parts = path.split('.')
|
||||
module_path = '.'.join(parts[:-1])
|
||||
class_name = parts[-1]
|
||||
module = import_module(module_path)
|
||||
return getattr(module, class_name)
|
||||
Reference in New Issue
Block a user