crystal-technologies's picture
Update maskrcnn_benchmark/utils/imports.py
97ed795
raw
history blame contribute delete
314 Bytes
import importlib.util
import sys
def import_file(module_name, file_path, make_importable=False):
spec = importlib.util.spec_from_file_location(module_name, file_path)
module = importlib.util.module_from_spec(spec)
sys.modules[module_name] = module
spec.loader.exec_module(module)
return module