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

ValueError: 'sequential/conv2d/BiasAdd__6:0/' is not a valid scope name #143

Open
deekshith1352 opened this issue Jun 27, 2022 · 2 comments

Comments

@deekshith1352
Copy link

Traceback (most recent call last):
File "D:/onnx2keras-master/dd.py", line 8, in
k_model = onnx_to_keras(onnx_model, ['input'])
File "D:\onnx2keras-master\onnx2keras\converter.py", line 182, in onnx_to_keras
keras_names
File "D:\onnx2keras-master\onnx2keras\reshape_layers.py", line 30, in convert_transpose
layers[node_name] = permute(layers[input_name])
File "C:\Users\21768\Anaconda3\envs\conv\lib\site-packages\keras\engine\base_layer.py", line 977, in call
input_list)
File "C:\Users\21768\Anaconda3\envs\conv\lib\site-packages\keras\engine\base_layer.py", line 1115, in _functional_construction_call
inputs, input_masks, args, kwargs)
File "C:\Users\21768\Anaconda3\envs\conv\lib\site-packages\keras\engine\base_layer.py", line 848, in _keras_tensor_symbolic_call
return self._infer_output_signature(inputs, args, kwargs, input_masks)
File "C:\Users\21768\Anaconda3\envs\conv\lib\site-packages\keras\engine\base_layer.py", line 880, in _infer_output_signature
with backend.name_scope(self._name_scope()): # pylint: disable=not-callable
File "C:\Users\21768\Anaconda3\envs\conv\lib\site-packages\tensorflow\python\framework\ops.py", line 6729, in enter
scope_name = scope.enter()
File "C:\Users\21768\Anaconda3\envs\conv\lib\contextlib.py", line 81, in enter
return next(self.gen)
File "C:\Users\21768\Anaconda3\envs\conv\lib\site-packages\tensorflow\python\framework\ops.py", line 4279, in name_scope
raise ValueError("'%s' is not a valid scope name" % name)
ValueError: 'sequential/conv2d/BiasAdd__6:0/' is not a valid scope name

@deekshith1352
Copy link
Author

its a pretrained model. i got it from web how to fix the issue with layer name of pretrained model

@aspratyush
Copy link

adding: name_policy='renumerate' has worked at times for me.

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

Successfully merging a pull request may close this issue.

2 participants