1.ValueError: not enough values to unpack (expected 7, got 0)
在SSD的相关配置文件中,把replicas_to_aggregate的参数修改为1或者把sync_replicas的参数修改为false即可解决问题:
train_config: {
fine_tune_checkpoint: "/data/detection_model_zoo/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03/model.ckpt"
batch_size: 1
sync_replicas: True #修改为false
startup_delay_steps: 0
replicas_to_aggregate: 8 #修改为1
num_steps: 250000
......
}
2.TypeError: resnet_v1_50() got an unexpected keyword argument 'min_base_depth'2.
在github中有人说,有人提交了一次修改增加了两个关键词参数:min_base_depth 和 depth_multiplier,然而任何一个resnet 模型里都没有这两个参数,因此出现了这个错误,其建议的方法是,将下面三行参数注释掉:
#From /data/tensorflow/models/research/object_detection/models/ssd_resnet_v1_fpn_feature_extractor.py
with tf.variable_scope(
self._resnet_scope_name, reuse=self._reuse_weights) as scope:
with slim.arg_scope(resnet_v1.resnet_arg_scope()):
with (slim.arg_scope(self._conv_hyperparams_fn())
if self._override_base_feature_extractor_hyperparams else
context_manager.IdentityContextManager()):
_,image_features = self._resnet_base_fn(
inputs=ops.pad_to_multiple(preprocessed_inputs,
self._pad_to_multiple),
num_classes=None,
is_training=None,
global_pool=False,
output_stride=None,
store_non_strided_activations=True) #括号填在这里
#min_base_depth=self._min_depth,
#depth_multiplier=self._depth_multiplier)
#scope=self.scope)
3.ValueError: No variables to save
找到SSD的配置文件,在train_config块内修改”from_detection_checkpoint: false“ 为”from_detection_checkpoint: True“,如果没有这一项,手动添加“from_detection_checkpoint: True”即可。
train_config: {
fine_tune_checkpoint: "Path/model.ckpt"
from_detection_checkpoint: True #将false修改为true,如果没有这一项,手动添加即可。
......
}
还有小伙伴们遇到什么问题,可以在下面留言,我们一起讨论解决方法!