tensorflow / tensorflow/models
Not able to retrain SSD MobileNet V2 FPNLite on GCP AI Platform
@pkulzc is already working on this.
Since Mar 30, 2021.
- Dominant language
- Python
- Stars
- 77.7k
- Forks
- 44.8k
- PR merge metrics
- No merged PRs in 30d
Description
Prerequisites
Please answer the following questions for yourself before submitting an issue.
- I am using the latest TensorFlow Model Garden release and TensorFlow 2.
- I am reporting the issue to the correct repository. (Model Garden official or research directory)
- I checked to make sure that this issue has not already been filed.
So i am currently trying to migrate my former TF 1.15 Object detection API scenario to TF2. I am training all my models on GCP AI platform. So what i have done now is trying the whole thing with TF2. I downloaded the pretrained SSD MobileNet V2 FPNLite 320x320 model from the TF2 repository to use it for my transfer learning. As instructed in the documentation, I cloned the repository and followed the steps to install the object detection api. Then i edited the model config file to fit to my needs. (I just change num_classes, fine_tuning_checkpoint and the path variables to point to my tfrecords) All my artifacts like the tfrecords, config and output dir are stored in a GCP bucket. After this i tried to start the training on GCP AI platform with the following command inside the research folder:
gcloud ai-platform jobs submit training object_detection_`date +%m_%d_%Y_%H_%M_%S` \
--runtime-version 2.4 \
--python-version 3.7 \
--job-dir=gs://${MODEL_DIR} \
--package-path ./object_detection \
--module-name object_detection.model_main_tf2 \
--region us-central1 \
--config ${PATH_TO_LOCAL_YAML_FILE} \
-- \
--model_dir=gs://${MODEL_DIR} \
--pipeline_config_path=gs://${PIPELINE_CONFIG_PATH}
I also have to mention that i run this command inside a conda environment just like I did with the setup.
After executing the gcloud command, the training is queued up.
Then it takes a while to show up the first logs. Then suddenly the training stops with a bunch of always the same error messages:
"jsonPayload": {
"message": "NameError: name 'open' is not defined",
"created": 1616860467.038573,
"lineno": 328,
"pathname": "/runcloudml.py",
"levelname": "ERROR"
},
"jsonPayload": {
"pathname": "/runcloudml.py",
"levelname": "ERROR",
"lineno": 328,
"created": 1616860467.037546,
"message": "W0327 15:54:26.939787 140658443433792 util.py:161] Unresolved object in checkpoint: (root).model._feature_extractor._fpn_features_generator.conv_layers.1.1.moving_mean"
},
So these kind of errors repeat and repeat until the training jobs gets canceled.
As you can see from the gcloud command, i am using the latest TF2 Object Detection API with TF 2.4 and Python 3.7
Does anyone know how to fix that or has the same problems?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.