What are the constraints for tensorflow scope names?

Question:

I’m running a tensorflow model and getting the following error:

ValueError: 'Cement (component 1)(kg in a m^3 mixture)' is not a valid scope name.

I get that tensorflow probably doesn’t like special chars and spaces in its scope names, but I’m trying to find an actual doc on what chars are allowed. Does anyone know where I could find this?

Asked By: Allen More

||

Answers:

From the TF source:

NOTE: This constructor validates the given name. Valid scope

names match one of the following regular expressions:

[A-Za-z0-9.][A-Za-z0-9_.\-/]* (for scopes at the root)
[A-Za-z0-9_.\-/]* (for other scopes)
Answered By: Salvador Dali

do not give space between the name example

here name = 'name of model' here you have given space that is why this model gives this error if you put name = 'name_of_model' it will not give you this error

Answered By: jaihind yadav
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.