WARNING:root:变量[...]在检查点中不可用。

问题描述 投票:1回答:1

我正试图训练一个检测树干的模型.我已经准备好了我的输入.所以,我以下面的方式执行训练脚本。

#!/bin/bash

# Exit script on error.
set -e
# Echo each command, easier for debugging.
set -x

export PYTHONPATH=`pwd`:`pwd`/slim:$PYTHONPATH

num_training_steps=500
num_eval_steps=100

MODEL_DIR="/home/andre-criis/Source/coral/detect/models/research/models/mobilenet_v2"
TRAIN_DIR=train_dir
mkdir "${TRAIN_DIR}"

python3 object_detection/model_main.py \
  --pipeline_config_path=${MODEL_DIR}/pipeline.config \
  --model_dir=${TRAIN_DIR} \
  --num_train_steps="${num_training_steps}" \
  --num_eval_steps="${num_eval_steps}" \
  --sample_1_of_n_eval_examples=1 \
  --alsologtostderr

然而,我卡在了这个错误中。

WARNING:root:Variable [BoxPredictor_0/BoxEncodingPredictor/biases] is not available in checkpoint
...
WARNING:root:Variable [FeatureExtractor/MobilenetV2/expanded_conv/project/BatchNorm/gamma] is not available in checkpoint
...
WARNING:root:Variable [FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_5_1x1_64/BatchNorm/gamma] is not available in checkpoint

这很奇怪,因为我为训练创建了一个空目录(如上图所示),而参数是: from_detection_checkpoint 设置为 true 在我 pipeline.config.

有谁能帮帮我吗,先谢谢了。

tensorflow object-detection
1个回答
0
投票

在这里添加解决方案,即使它存在于 Github赠予,以飨读者。StackOverflow 社区。

可以通过添加 fine_tune_checkpoint_type: 'detection'pipeline.config 文件。

更多详情请参考 此处

© www.soinside.com 2019 - 2024. All rights reserved.