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

Error when converting pretrained model: (raise ValueError("'%s' is not a valid scope name" % name) and 'functional_9/conv1/conv/Conv2D__6:0' is not a valid scope name #134

Open
Lad4life opened this issue Nov 17, 2021 · 1 comment

Comments

@Lad4life
Copy link

I tried to use the following code to change my onnx model to a keras model. I am using tensorflow version 2.1.0. My model is a densenet model that has been retrained for a new dataset. Let me know if additional information would be helpful. Thank you for your help!

#%% Load packages
import tensorflow as tf
import tf2onnx 
import onnx
#%%
from onnx2keras import onnx_to_keras

#%% Load onnx model
onnx_model=onnx.load("Test_10_DC_R_Image.onnx")


#%% Convert to keras model
k_model = onnx_to_keras(onnx_model, input_names=['input'])

This is the error I recieved:

raise ValueError("'%s' is not a valid scope name" % name)

ValueError: 'functional_9/conv1/conv/Conv2D__6:0' is not a valid scope name

@deekshith1352
Copy link

Did you solve this error

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

2 participants