tensorflow / tensorflow/java

NameScope interacts poorly with subscoping

Aperta
#413 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Java
Stelle
928
Fork
227
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia alla riga 44 di GraphTestSession di tensorflow-framework e confronta il comportamento di Ops.withName("test") e Ops.withSubScope("test"). Riproduci il fallimento in FtrlTest.testFtrlWithL1 alla riga 166, quindi esamina il nome generato e la validazione del nome coinvolta. Il lavoro è completato quando i test dell’ottimizzatore passano e i nodi di test conservano nomi di Op validi e utilizzabili per il debug.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java, tensorflow
Ambito
api, backend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.