Created
December 1, 2020 06:35
-
-
Save zakirangwala/23a72746ef5f3fc36fe6015865a14a84 to your computer and use it in GitHub Desktop.
Load model - Mask Detection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load Model from checkpoints | |
def load_model(): | |
configs = config_util.get_configs_from_pipeline_file(CONFIG_PATH) | |
detection_model = model_builder.build( | |
model_config=configs['model'], is_training=False) | |
ckpt = tf.compat.v2.train.Checkpoint(model=detection_model) | |
ckpt.restore(os.path.join(CHECKPOINT_PATH, 'ckpt-9')).expect_partial() | |
return detection_model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment