3

I am trying to use the tensorboard callback in keras. When I run the pretrained inceptionv3 model with the tensorboard callback I am getting the following warning:

INFO:tensorflow:Summary name conv2d_95/kernel:0 is illegal; using conv2d_95/kernel_0 instead.

I saw a comment on Github addressing this issue. SeaFX on his comment pointed out that he solved it by replacing variable.name with variable.name.replace(':','_'). I am unsure how to do that. Can anyone please help me. Thanks in advance :)

iehrlich
  • 3,572
  • 4
  • 34
  • 43
Abhijit Balaji
  • 1,870
  • 4
  • 17
  • 40

1 Answers1

1

Not sure on getting name replacement to work however a workaround that may be sufficient for your needs is:

import tensorflow as tf
tf.logging.set_verbosity(tf.logging.WARN)

import keras

This will turn off all INFO level logging but keep warnings, errors etc.

See this question for a discussion on the various log levels and changing them. Personally I found setting the TF_CPP_MIN_LOG_LEVEL environment variable didn't work under Jupyter notebook but I haven't tested on base Python.

Lif3line
  • 111
  • 6
  • 1
    This is not a proper answer – GPrathap Apr 11 '18 at 16:26
  • I'm open to improving it if you have a recommendation? – Lif3line Apr 27 '18 at 10:39
  • Putting tf.logging.set_verbosity(tf.logging.WARN) it will hide all info level log messages which is not good. If you want to solve a problem need to find what is the root course, going around it will fix the problem with some side affects :) – GPrathap Apr 27 '18 at 16:47
  • The cause in my case was the naming conventions from other libraries and network examples which are unfortunately impractical to change. Agreed you'll miss out on other info level messages which may not be ideal but for my sort of case it's potentially a useful workaround to declutter outputs. – Lif3line Apr 29 '18 at 17:48