def load_model(model_file_path, compute_metric):
    assert os.path.exists(model_file_path)
    model = Model(compute_metric)
    run_model_on_random_input(model)
    model.load_weights(model_file_path)
    run_eagerly = (True if compute_metric else False)
    model.compile(run_eagerly=run_eagerly)
    return model
def load_model(model_file_path, compute_metric):
    assert os.path.exists(model_file_path)
    model = Model(compute_metric)
    run_model_on_random_input(model)
    model.load_weights(model_file_path)
    run_eagerly = (True if compute_metric else False)
    model.compile(run_eagerly=run_eagerly)
    return model