Open pranoyr opened 2 years ago
The first thing to try is an old version of onnx, since the pypi version of this package hasnt been updated in a very long time.
ok so I encountered this, the fix is to go into your tensorflow source in the file env/lib/python3.9/site-packages/tensorflow/python/framework/ops.py
in your virtualenv and kill all the regex checks for node and scope name format. Seemed to work for me lol. As far as I can tell, tensorflow imposed new name restrictions, and you can just remove the restrictions lol(who knows if there could be unintended consequences).
Actually, even better, try setting the name_policy
to "renumerate"
when calling pytorch_to_keras
. This fixed that error for me, without requiring such a cursed form of patch to tensorflow.
Actually, even better, try setting the
name_policy
to"renumerate"
when callingpytorch_to_keras
. This fixed that error for me, without requiring such a cursed form of patch to tensorflow.
Thank you very much, solved my problem!
Describe the bug I am running the below code snippet and getting this error.
ValueError: 'onnx::Ma/' 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_.\/>-]*$
To Reproduce
Environment (please complete the following information):