"git@developer.sourcefind.cn:modelzoo/resnet50_tensorflow.git" did not exist on "4e434726a3d67c9daefea4d63412c59abbc751c5"
Commit bda5126e authored by Zhichao Lu's avatar Zhichao Lu Committed by pkulzc
Browse files

Minor change to remove redundant check for finetune_checkpoint_type.

PiperOrigin-RevId: 189997094
parent 2672cdbd
...@@ -250,14 +250,6 @@ def create_model_fn(detection_model_fn, configs, hparams, use_tpu=False): ...@@ -250,14 +250,6 @@ def create_model_fn(detection_model_fn, configs, hparams, use_tpu=False):
prediction_dict, features[fields.InputDataFields.true_image_shape]) prediction_dict, features[fields.InputDataFields.true_image_shape])
if mode == tf.estimator.ModeKeys.TRAIN: if mode == tf.estimator.ModeKeys.TRAIN:
if not train_config.fine_tune_checkpoint_type:
# train_config.from_detection_checkpoint field is deprecated. For
# backward compatibility, sets finetune_checkpoint_type based on
# from_detection_checkpoint.
if train_config.from_detection_checkpoint:
train_config.fine_tune_checkpoint_type = 'detection'
else:
train_config.fine_tune_checkpoint_type = 'classification'
if train_config.fine_tune_checkpoint and hparams.load_pretrained: if train_config.fine_tune_checkpoint and hparams.load_pretrained:
if not train_config.fine_tune_checkpoint_type: if not train_config.fine_tune_checkpoint_type:
# train_config.from_detection_checkpoint field is deprecated. For # train_config.from_detection_checkpoint field is deprecated. For
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment