INNER CODE UNIT · Python

load_backend

lululxvi/deepxde · deepxde/backend/__init__.py:59

def load_backend(mod_name):
    backend_message(mod_name)
    mod = importlib.import_module(".%s" % mod_name.replace(".", "_"), __name__)
    thismod = sys.modules[__name__]
    # log backend name
    setattr(thismod, "backend_name", mod_name)
    for api in backend.__dict__.keys():
        if api.startswith("__"):
            # ignore python builtin attributes
            continue
        if api == "data_type_dict":
            # load data type
            if api not in mod.__dict__:
                raise ImportError(
                    'API "data_type_dict" is required but missing for backend "%s".'
                    % mod_name
                )
            data_type_dict = mod.__dict__[api]()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…