python - EfficientDet-Custom数据集-StringToNumberOp无法正确转换字符串

标签 python tensorflow error-handling efficientnet

作为一个初学者,我正在尝试使用TensorFlow训练我的自定义数据集,但是在开始训练时出现以下错误:

enter image description here

这是我的命令行:

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/

相关文章:

python - TensorFlow 训练多个 epoch 的批处理?

vba - 来自网页的消息。 : 1行出现堆栈溢出

python - 使用 flask-wtforms 输出类型 ="number"

python - 如何在 tensorflow 中置换转置?

python - 在 Python 中以一定角度(旋转)绘制文本

python - 如何保存一个热编码器?

php - 解析错误 - 语法错误,意外的 T_NS_SEPARATOR

c++ - 如何防止插件崩溃影响主程序 (dlopen)

python - 如何最有效地检测 Python 中目录的文件添加/删除/重命名更改?

用于运行进程的 Python REPL