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

'/Reshape_output_0/' is not a valid root scope name. #169

Open
kovarole2 opened this issue Aug 3, 2023 · 2 comments
Open

'/Reshape_output_0/' is not a valid root scope name. #169

kovarole2 opened this issue Aug 3, 2023 · 2 comments

Comments

@kovarole2
Copy link

kovarole2 commented Aug 3, 2023

Trying to load and use onnx exported from pytorch - (1, 3, 28, 28).

onnx_model = onnx.load('data/export-torch.onnx')
k_model = onnx_to_keras(onnx_model, ['actual_input'])

DEBUG:onnx2keras:...
DEBUG:onnx2keras:Check if all inputs are available:
DEBUG:onnx2keras:Check input 0 (name actual_input).
DEBUG:onnx2keras:Check input 1 (name /Constant_output_0).
DEBUG:onnx2keras:... found all, continue
DEBUG:onnx2keras:reshape:The second argument is numpy array.
DEBUG:onnx2keras:reshape:The first argument is Keras/tf layer. Apply keras.Reshape.
DEBUG:onnx2keras:reshape:Target shape :
DEBUG:onnx2keras:reshape:[784]
....
--> 191 layers[node_name] = reshape(input_0)
....
ValueError: '/Reshape_output_0/' is not a valid root scope name. A root scope name has to match the following pattern: ^[A-Za-z0-9.][A-Za-z0-9_.\/>-]*$

@kovarole2
Copy link
Author

node {
input: "/Reshape_output_0"
input: "linear1.weight"
input: "linear1.bias"
output: "/linear1/Gemm_output_0"
name: "/linear1/Gemm"
op_type: "Gemm"
attribute {
name: "alpha"
type: FLOAT
f: 1
}
attribute {
name: "beta"
type: FLOAT
f: 1
}
attribute {
name: "transB"
type: INT
i: 1
}
}

@boutiche
Copy link

Hello,
I have the same issue, did you find any solution for this?

Thank you

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