eval on own dataset : waiting for new checkpoint
firstly i train with my own data,get ckpt. secondly i try to eval the model as follows:
python main.py --mode=eval --model_name=efficientdet-d3 --model_dir=tmp/efficientdet-d3-scratch --model=/tmp/efficientdet-d3-scratch/ --validation_file_pattern=tfrecord/test-* --val_json_file=/jiangzhixin002/label_dataset/result/Annotations_test.json --hparams="use_bfloat16=false" --use_tpu=False
but i got some error: Skipping registering GPU devices... 2020-04-20 21:23:16.468631: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix: 2020-04-20 21:23:16.468647: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108] 0 1 2020-04-20 21:23:16.468661: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1121] 0: N Y 2020-04-20 21:23:16.468669: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1121] 1: Y N INFO:tensorflow:Restoring parameters from /jiangzhixin002/label_dataset/automl/efficientdet/tmp/efficientdet-d3-scratch/model.ckpt-0000 I0420 21:23:16.477479 140340755253056 saver.py:1293] Restoring parameters from /jiangzhixin002/label_dataset/automl/efficientdet/tmp/efficientdet-d3-scratch/model.ckpt-0000 2020-04-20 21:23:18.783542: W tensorflow/core/framework/op_kernel.cc:1752] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Not found: Key box_net/box-0-bn-3/beta/ExponentialMovingAverage not found in checkpoint INFO:tensorflow:evaluation_loop marked as finished I0420 21:23:18.797615 140340755253056 error_handling.py:115] evaluation_loop marked as finished WARNING:tensorflow:Reraising captured error W0420 21:23:18.797851 140340755253056 error_handling.py:149] Reraising captured error I0420 21:23:18.797954 140340755253056 main.py:355] Checkpoint /jiangzhixin002/label_dataset/automl/efficientdet/tmp/efficientdet-d3-scratch/model.ckpt-0000 no longer exists, skipping checkpoint
Looks like your model is trained with moving_average_decay=0.0, and you need to use the same hparams (possibly like "hparams="use_bfloat16=false,moving_average_decay=0" )
Make sure you use the same hparams for both train and eval.
I am going to close this issue for now, but feel free to reopen it if you still have issues.
I am going to close this issue for now, but feel free to reopen it if you still have issues.
i make sure the param is true ,but it have some errors
Instructions for updating: non-resource variables are not supported in the long term WARNING:tensorflow:From main.py:224: The name tf.estimator.tpu.TPUConfig is deprecated. Please use tf.compat.v1.estimator.tpu.TPUConfig instead.
W0426 00:04:20.804015 140160543135552 module_wrapper.py:139] From main.py:224: The name tf.estimator.tpu.TPUConfig is deprecated. Please use tf.compat.v1.estimator.tpu.TPUConfig instead.
WARNING:tensorflow:From main.py:229: The name tf.estimator.tpu.InputPipelineConfig is deprecated. Please use tf.compat.v1.estimator.tpu.InputPipelineConfig instead.
W0426 00:04:20.804265 140160543135552 module_wrapper.py:139] From main.py:229: The name tf.estimator.tpu.InputPipelineConfig is deprecated. Please use tf.compat.v1.estimator.tpu.InputPipelineConfig instead.
WARNING:tensorflow:From main.py:232: The name tf.estimator.tpu.RunConfig is deprecated. Please use tf.compat.v1.estimator.tpu.RunConfig instead.
W0426 00:04:20.804477 140160543135552 module_wrapper.py:139] From main.py:232: The name tf.estimator.tpu.RunConfig is deprecated. Please use tf.compat.v1.estimator.tpu.RunConfig instead.
I0426 00:04:20.804714 140160543135552 main.py:244] {'name': 'efficientdet-d1', 'act_type': 'swish', 'image_size': 640, 'input_rand_hflip': True, 'train_scale_min': 0.1, 'train_scale_max': 2.0, 'autoaugment_policy': None, 'num_classes': 13, 'skip_crowd_during_training': True, 'min_level': 3, 'max_level': 7, 'num_scales': 3, 'aspect_ratios': [(1.0, 1.0), (1.4, 0.7), (0.7, 1.4)], 'anchor_scale': 4.0, 'is_training_bn': True, 'momentum': 0.9, 'learning_rate': 0.08, 'lr_warmup_init': 0.008, 'lr_warmup_epoch': 1.0, 'first_lr_drop_epoch': 200.0, 'second_lr_drop_epoch': 250.0, 'poly_lr_power': 0.9, 'clip_gradients_norm': 10.0, 'num_epochs': 15, 'data_format': 'channels_last', 'alpha': 0.25, 'gamma': 1.5, 'delta': 0.1, 'box_loss_weight': 50.0, 'weight_decay': 4e-05, 'use_bfloat16': False, 'use_tpu': False, 'box_class_repeats': 3, 'fpn_cell_repeats': 4, 'fpn_num_filters': 88, 'separable_conv': True, 'apply_bn_for_resampling': True, 'conv_after_downsample': False, 'conv_bn_act_pattern': False, 'use_native_resize_op': False, 'pooling_type': None, 'fpn_name': None, 'fpn_weight_method': None, 'fpn_config': None, 'survival_prob': None, 'lr_decay_method': 'cosine', 'moving_average_decay': 0, 'ckpt_var_scope': None, 'var_exclude_expr': './class-predict/.', 'backbone_name': 'efficientnet-b1', 'backbone_config': None, 'resnet_depth': 50, 'model_name': 'efficientdet-d1', 'iterations_per_loop': 100, 'model_dir': 'tmp/efficientdet-d1', 'num_shards': 8, 'num_examples_per_epoch': 120000, 'backbone_ckpt': '', 'ckpt': 'tmp/efficientdet-d1-scratch/', 'val_json_file': 'tfrecord/json_own_test.json', 'testdev_dir': None, 'mode': 'eval'} WARNING:tensorflow:From main.py:296: The name tf.estimator.tpu.TPUEstimator is deprecated. Please use tf.compat.v1.estimator.tpu.TPUEstimator instead.
W0426 00:04:20.804909 140160543135552 module_wrapper.py:139] From main.py:296: The name tf.estimator.tpu.TPUEstimator is deprecated. Please use tf.compat.v1.estimator.tpu.TPUEstimator instead.
INFO:tensorflow:Using config: {'_model_dir': 'tmp/efficientdet-d1', '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_steps': None, '_save_checkpoints_secs': 600, '_session_config': allow_soft_placement: true , '_keep_checkpoint_max': 5, '_keep_checkpoint_every_n_hours': 10000, '_log_step_count_steps': None, '_train_distribute': None, '_device_fn': None, '_protocol': None, '_eval_distribute': None, '_experimental_distribute': None, '_experimental_max_worker_delay_secs': None, '_session_creation_timeout_secs': 7200, '_service': None, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x7f790dd6fbe0>, '_task_type': 'worker', '_task_id': 0, '_global_id_in_cluster': 0, '_master': '', '_evaluation_master': '', '_is_chief': True, '_num_ps_replicas': 0, '_num_worker_replicas': 1, '_tpu_config': TPUConfig(iterations_per_loop=100, num_shards=8, num_cores_per_replica=None, per_host_input_for_training=3, tpu_job_name=None, initial_infeed_sleep_secs=None, input_partition_dims=None, eval_training_input_configuration=2, experimental_host_call_every_n_steps=1), '_cluster': None} I0426 00:04:20.805482 140160543135552 estimator.py:212] Using config: {'_model_dir': 'tmp/efficientdet-d1', '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_steps': None, '_save_checkpoints_secs': 600, '_session_config': allow_soft_placement: true , '_keep_checkpoint_max': 5, '_keep_checkpoint_every_n_hours': 10000, '_log_step_count_steps': None, '_train_distribute': None, '_device_fn': None, '_protocol': None, '_eval_distribute': None, '_experimental_distribute': None, '_experimental_max_worker_delay_secs': None, '_session_creation_timeout_secs': 7200, '_service': None, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x7f790dd6fbe0>, '_task_type': 'worker', '_task_id': 0, '_global_id_in_cluster': 0, '_master': '', '_evaluation_master': '', '_is_chief': True, '_num_ps_replicas': 0, '_num_worker_replicas': 1, '_tpu_config': TPUConfig(iterations_per_loop=100, num_shards=8, num_cores_per_replica=None, per_host_input_for_training=3, tpu_job_name=None, initial_infeed_sleep_secs=None, input_partition_dims=None, eval_training_input_configuration=2, experimental_host_call_every_n_steps=1), '_cluster': None} INFO:tensorflow:_TPUContext: eval_on_tpu True I0426 00:04:20.806310 140160543135552 tpu_context.py:220] _TPUContext: eval_on_tpu True WARNING:tensorflow:eval_on_tpu ignored because use_tpu is False. W0426 00:04:20.806690 140160543135552 tpu_context.py:222] eval_on_tpu ignored because use_tpu is False. INFO:tensorflow:Waiting for new checkpoint at tmp/efficientdet-d1 I0426 00:04:20.806810 140160543135552 checkpoint_utils.py:124] Waiting for new checkpoint at tmp/efficientdet-d1
Looks like you are training efficientdet-d3, but eval with efficientdet-d1? Can you double check your "tmp/efficientdet-d1" is not empty?
Looks like you are training efficientdet-d3, but eval with efficientdet-d1? Can you double check your "tmp/efficientdet-d1" is not empty?
yeah ,amazing, thank u so much.
1、another question,if i have 5000 own images with 13 classes,how can i get higher AP, d3,d4? or finetuning on coco or train on ImageNet?
waiting for your suggestion.
If your dataset is so small, you should finetune from COCO pretrained checkpoints by using "--ckpt".
Also, when you finetune, you should use lower learning rate (maybe 1/4 or 1/8 of the original learning rate).
If your dataset is so small, you should finetune from COCO pretrained checkpoints by using "--ckpt".
Also, when you finetune, you should use lower learning rate (maybe 1/4 or 1/8 of the original learning rate).
thank u again, i will try