1

As a beginner, I am trying to train my custom datasets with TensorFlow, but getting the following error when start training:

enter image description here

here is my command line:

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
Max
  • 509
  • 1
  • 7
  • 21

1 Answers1

2

Answered here on github. Its an issue with tfrecord creations. In your tf record creation script, change source_id

'image/source_id': dataset_util.bytes_feature(input_image_filename.encode('utf8')),

to

'image/source_id': dataset_util.bytes_feature('0'.encode('utf8')),

You don't need to modify any filenames. Original link below.

https://github.com/google/automl/issues/307#issuecomment-626587210