MCPcopy Create free account
hub / github.com/chibohe/text_recognition_toolbox / create_module

Function create_module

utils.py:67–74  ·  view source on GitHub ↗
(module_str)

Source from the content-addressed store, hash-verified

65
66
67def create_module(module_str):
68 tmpss = module_str.split(",")
69 assert len(tmpss) == 2, "Error formate\
70 of the module path: {}".format(module_str)
71 module_name, function_name = tmpss[0], tmpss[1]
72 somemodule = importlib.import_module(module_name, __package__)
73 function = getattr(somemodule, function_name)
74 return function
75
76
77class RecMetric:

Callers 3

build_modelFunction · 0.90
build_data_loaderFunction · 0.90
build_lossFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected