Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't import any model using ImportGraphDef #39

Open
niskov opened this issue Jul 9, 2020 · 5 comments
Open

Can't import any model using ImportGraphDef #39

niskov opened this issue Jul 9, 2020 · 5 comments

Comments

@niskov
Copy link

niskov commented Jul 9, 2020

Tried the following:

  1. Train model (python) on Keras (TF 2.2) and saving the model as h5 - can't import [Exception: 'InvalidGraphDef']
  2. Freeze the above model and migrate to .pb file (similar to what we've done @ tf 1.15) - can't import [Exception: 'Input 1 of node bn_Conv1/cond was passed float from bn_Conv1/gamma:0 incompatible with expected resource.']
  3. Train model (python) on Keras (TF 2.2) and saving the model as pb ('savedmodel' format) - can't import [Exception: 'InvalidGraphDef']

Is there's another way to import models?

@emgucv
Copy link
Owner

emgucv commented Jul 13, 2020

The issues has been fixed in this commit:
476fe2a
TF 2.x can only saved model as a "SavedModel" format, which exports to a folder. The folder needs to be loaded with the added function above.

TensorFlow v1.x exported the models to a single .pb file, which is no longer supported in python Tensorflow v2.x. See:
tensorflow/tensorflow#29253

We also added a resnet demo to show how to import "SavedModel" folder from TF 2.0 here:
9390abe

This will be included as part of the up coming TF 2.3 release.

Let me know if you want to give it a try and I can send over a development build.

@vpenades
Copy link

Is there a roadmap for TF 2.3 release? we're having a similar issue and we suspect it's related to requiring TensorFlow 2.3

We don't need an exact date.... but knowing if it's going to be a matter of weeks... or months, is critical for us.

@emgucv
Copy link
Owner

emgucv commented Aug 24, 2020

We should be releasing Emgu TF v2.3 in about 2 weeks.

@vpenades
Copy link

@emgucv Any update on TF v2.3 release?

@emgucv
Copy link
Owner

emgucv commented Sep 16, 2020

It will be delayed. We run into issues with the TF v2.3 GPU build: We are not able to get TF v2.3.0 to compile with CUDA 10.2 and DNN 8.0. The 2.3.0 release is also not able to compile with CUDA 11, the issue has been fixed in the TF master branch. We may have a release based on the TF master to get the GPU version working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants