[k.replace(':', '_') for k in keras_names]
if isinstance(keras_names, list) else keras_names.replace(':', '_')
I'm now wondering whether this is a proper fix or just a work around. Maybe there could be a validation/coercion step where all invalid Tensorflow names could be replaced by fill character.
When I try to re-import a Keras model. I get an error about invalid scope names in Tensorflow. The mentioned scope had a
:
in it's name.I could solve the bug by replacing all
:
by_
forkeras_names
in this line https://github.com/gmalivenko/onnx2keras/blob/45c81f221bb4228751abb061cb24d473bb74a8e8/onnx2keras/converter.py#L182I'm now wondering whether this is a proper fix or just a work around. Maybe there could be a validation/coercion step where all invalid Tensorflow names could be replaced by fill character.