0

Hi following is my cmd for redirect message into /tmp/log.txt

!python models/ts_model/run.py \
    --name test > /tmp/log.txt

But I still see lots of following warning messages (Most from Tensorflow, not sure whether it is related) in the console.

WARNING:tensorflow:Entity <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f5e46ddfb70>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting <bound method Dense.call of <tensorflow.python.layers.core.Dense object at 0x7f5e46ddfb70>>: AssertionError: Bad argument number for Name: 3, expecting 4

I tried different ways (also redirect error message 2 > xxx.txt). All of them don't work. Wondering someone gives me suggestions?

Hypnoz
  • 1,115
  • 4
  • 15
  • 27

1 Answers1

0

set following env variable before importing the tensorflow

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'

import tensorflow as tf

More details about other values of that environment variable, take a look at https://stackoverflow.com/a/42121886/1986981

  • Hi actually I know how to suppress those messages. Wondering could I redirect those messages into a file? – Hypnoz Jul 16 '20 at 22:17