作为一个初学者,我正在尝试使用TensorFlow训练我的自定义数据集,但是在开始训练时出现以下错误:
这是我的命令行:
python main.py --mode=train_and_eval
--training_file_pattern=tfrecord/train.record
--validation_file_pattern=tfrecord/test.record
--model_name=efficientdet-d0
--model_dir=/tmp/efficientdet-d0-scratch
--backbone_ckpt=efficientnet-b0
--train_batch_size=8
--eval_batch_size=8 --eval_samples=512
--num_examples_per_epoch=5717 --num_epochs=1
--hparams="num_classes=4,moving_average_decay=0"
--use_tpu=False
最佳答案
在github上回答。它与tfrecord创作有关。在您的tf记录创建脚本中,更改source_id
'image/source_id': dataset_util.bytes_feature(input_image_filename.encode('utf8')),
至
'image/source_id': dataset_util.bytes_feature('0'.encode('utf8')),
您不需要修改任何文件名。以下是原始链接。
https://github.com/google/automl/issues/307#issuecomment-626587210
关于python - EfficientDet-Custom数据集-StringToNumberOp无法正确转换字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61870811/