tensorflow / tensorflow/java

NameScope interacts poorly with subscoping

Aberta
#413 2 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Linguagem predominante
Java
Estrelas
928
Forks
227
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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.

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece na linha 44 de GraphTestSession do tensorflow-framework e compare o comportamento de Ops.withName("test") e Ops.withSubScope("test"). Reproduza a falha em FtrlTest.testFtrlWithL1 na linha 166 e, em seguida, inspecione o nome gerado e a validação de nomes envolvida. Está concluído quando os testes do otimizador passam e os nós de teste mantêm nomes de Op válidos e depuráveis.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
java, tensorflow
Domínio
api, backend
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
42/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.