NameScope interacts poorly with subscoping
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Java
- Estrellas
- 928
- Forks
- 227
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
System information
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04 x86_64): macOS x86_64
- TensorFlow installed from (source or binary): source
- TensorFlow version (use command below): 0.5.0-SNAPSHOT
- Java version (i.e., the output of
java -version): JDK 11
Describe the current behavior
I'm trying to debug test failures in tensorflow-framework, and noticed that the test sessions use tf = Ops.create(graph).withName("test");. This makes all the nodes have the name "test_" which makes things pretty tricky to debug. I changed it to tf = Ops.create(graph).withSubScope("test");, but now I'm getting test failures out of the optimizers with the following message:
[INFO] Running org.tensorflow.framework.optimizers.FtrlTest
[ERROR] Tests run: 5, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.455 s <<< FAILURE! - in org.tensorflow.framework.optimizers.FtrlTest
[ERROR] testFtrlWithL1 Time elapsed: 0.415 s <<< ERROR!
java.lang.IllegalArgumentException: invalid name: 'test/var0_gradient_accumulator' does not match the regular expression [A-Za-z0-9.][A-Za-z0-9_.\-]*
at org.tensorflow.framework.optimizers.FtrlTest.testFtrlWithL1(FtrlTest.java:166)
Describe the expected behavior
No test failures, and test nodes have the correct op names.
Code to reproduce the issue
Make the withSubScope change at line 44 in org.tensorflow.framework.utils.GraphTestSession.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza en la línea 44 de GraphTestSession de tensorflow-framework y compara el comportamiento de Ops.withName("test") y Ops.withSubScope("test"). Reproduce el fallo en FtrlTest.testFtrlWithL1 en la línea 166 y, a continuación, inspecciona el nombre generado y la validación de nombres involucrada. La tarea estará terminada cuando las pruebas del optimizador pasen y los nodos de prueba conserven nombres de Op válidos y depurables.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java, tensorflow
- Área
- api, backend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 42/100