INNER CODE UNIT · Python

check_library_installed

HenryNdubuaku/nanodl · nanodl/__init__.py:308

def check_library_installed(lib_name):
    try:
        return importlib.import_module(lib_name)
    except ImportError:
        raise ImportError(f"{lib_name} is not installed or improperly installed.")


def test_flax(flax):
    model = flax.linen.Dense(features=10)


def test_jax(jax):
    arr = jax.numpy.array([1, 2, 3])
    result = jax.numpy.sum(arr)


def test_optax(optax):
    optimizer = optax.sgd(learning_rate=0.1)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…