Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion train_ssd.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
# checkpoint related configuration
tf.app.flags.DEFINE_string(
'checkpoint_path', './model',
'The path to a checkpoint from which to fine-tune.')
'The path to a checkpoint from which to fine-tune. If it is None, training model from scratch.')
tf.app.flags.DEFINE_string(
'checkpoint_model_scope', 'vgg_16',
'Model scope in the checkpoint. None if the same as the trained model.')
Expand Down
3 changes: 3 additions & 0 deletions utility/scaffolds.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def get_init_fn_for_scaffold(model_dir, checkpoint_path, model_scope, checkpoint
if tf.train.latest_checkpoint(model_dir):
tf.logging.info('Ignoring --checkpoint_path because a checkpoint already exists in %s.' % model_dir)
return None
if checkpoint_path is None:
tf.logging.info('Training detector from scratch.')
return None
exclusion_scopes = []
if checkpoint_exclude_scopes:
exclusion_scopes = [scope.strip() for scope in checkpoint_exclude_scopes.split(',')]
Expand Down