Fix Scope name collisions#248
Conversation
tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerSession.java
Outdated
Show resolved
Hide resolved
tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java
Show resolved
Hide resolved
tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/NameScope.java
Outdated
Show resolved
Hide resolved
tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/NameScope.java
Show resolved
Hide resolved
tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/NameScope.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <rnett@calpoly.edu>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
|
I had to add a quick fix for spotless as well, it wouldn't work when called from subdirectories. |
Signed-off-by: Ryan Nett <JNett96@gmail.com>
|
The latest commit removes copyright statements. We shouldn't do that. |
Signed-off-by: Ryan Nett <JNett96@gmail.com>
|
I took it out as per #209 (comment). Is that incorrect? |
Signed-off-by: Ryan Nett <JNett96@gmail.com>
|
You can remove it from things where the copyright is owned by TensorFlow contributors, or Google, if that's what they want. But you can't remove it from the code I've contributed as that's under an Oracle copyright, and my lawyers will be grumpy at me. In this case it's not doing that, but if you enforce that on commit or file update it will do, and that would be bad. |
Signed-off-by: Ryan Nett <JNett96@gmail.com>
Signed-off-by: Ryan Nett <JNett96@gmail.com>
karllessard
left a comment
There was a problem hiding this comment.
Ok I think the way env is passed to the various constructors of NameScope could still be improved but let's merge it the way it is now.
This fixes two possible sources of name collision issues:
This could probably be done better by either checking against the environment every time, or having a base NameScope instead of scope, but both of those would require large restructurings. This is just a patch to get it working.