Skip to content

exporter_main_v2.py: Failed to create a NewWriteableFile #9469

@slowbrain-jaym

Description

@slowbrain-jaym

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.

1. The entire URL of the file you are using

https://github.com/tensorflow/models/tree/master/research/object_detection/exporter_main_v2.py

2. Describe the bug

I trained model following the tutorial here: https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html#exporting-a-trained-model, the model appears to train correctly however when I come to export I get the following error in my command line:

tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a NewWriteableFile: .\exported-models\my_model\saved_model\variables\variables_temp_8d9add011de0452e891e55893e080caf/part-00000-of-00001.data-00000-of-00001.tempstate4391773862853614517 : The system cannot find the path specified.
; No such process [Op:SaveV2]

It looks like one of the 'slashes' is different to the others in the path to the variables file, with backslashes used everywhere except before "path-000..." and its causing the error.

3. Steps to reproduce

Follow linked tutorial, attempt to export trained model.

Exact command used:
python exporter_main_v2.py --input_type image_tensor --pipeline_config_path models\my_ssd_resnet50_v1_fpn\pipeline.config --trained_checkpoint_dir models\my_ssd_resnet50_v1_fpn\ --output_directory exported-models\my_model --use_side_inputs False

4. Expected behavior

Model is exported.

5. Additional context

6. System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
  • Mobile device name if the issue happens on a mobile device:
  • TensorFlow installed from (source or binary): conda
  • TensorFlow version (use command below): v2.3.0--54-gfcc4b966f1 2.3.1
  • Python version: 3.7
  • Bazel version (if compiling from source):
  • GCC/Compiler version (if compiling from source):
  • CUDA/cuDNN version: cuda 10.1, cudNN 10.1, 7.6.5.32
  • GPU model and memory: RTX 2060, 6GB

Metadata

Metadata

Labels

models:researchmodels that come under research directorytype:bugBug in the code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions