onnx-tensorflow icon indicating copy to clipboard operation
onnx-tensorflow copied to clipboard

export_graph takes long time and no output file

Open korabelnikov opened this issue 4 years ago • 6 comments

I've created new environment, windows OS, conda installed tensorflow==2.3.1 and onnx-tf via pip

I have onnx model exported from pytorch.

and the code


        onnx_model = onnx.load(input_path)  # load onnx model
        tf_rep = prepare(onnx_model)  # prepare tf representation
        tf_rep.export_graph(tf_output_path)  # export the model

takes about 5-10 minutes

output contains only tensosrflow-info like

020-12-08 22:22:24.119221: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library nvcuda.dll
2020-12-08 22:22:24.143047: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties: 

and no more

Any ideas?

upd. it seems that same code works under linux. I wil recheck and update this comment

korabelnikov avatar Dec 08 '20 19:12 korabelnikov

Can you git clone, run python util/get_version.py , and share the environment setup? Can you please provide the onnx file also for debugging?

chinhuang007 avatar Dec 08 '20 23:12 chinhuang007

Thank you for a fast response

2020-12-09 12:39:55.209331: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll Python version: 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] ONNX version: 1.8.0 ONNX-TF version: 1.7.0 Tensorflow version: 2.3.1

korabelnikov avatar Dec 09 '20 09:12 korabelnikov

Environment looks good. Can you possibly share the onnx file so I can investigate the issue?

chinhuang007 avatar Dec 09 '20 20:12 chinhuang007

faster_rcnn_mobilenetv2_backbone_only_224x224.zip

It seems issue occurs under Windows only

korabelnikov avatar Dec 10 '20 21:12 korabelnikov

@chinhuang007 Any updates here?

devloper13 avatar Mar 19 '21 12:03 devloper13

@devloper13 The model was converted successfully in my Ubuntu environment. Unfortunately I don't have Windows to verify. Hope someone in the community can help investigation further.

chinhuang007 avatar Mar 22 '21 20:03 chinhuang007