0

How do you disable all debugging logs from Tensorflow JS? In Python you can simply set an environment variable and call a function to also set logging.

Disable Debugging in Tensorflow (Python)

From the top answer:

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'  # or any {'0', '1', '2'}

import tensorflow as tf
tf.get_logger().setLevel('INFO')

But how can we do the same for Javascript?

Free Lancer
  • 1,000
  • 2
  • 16
  • 33

2 Answers2

1

It's easy, you can just set the variable to that run with:

$ TF_CPP_MIN_LOG_LEVEL=3 npm start

or you can set it globally in ~/.profile to disable for every run.

dvil
  • 41
  • 1
  • 4
1

For those attempting to silence model training logs:

this.model.fit(tf.tensor(data), tf.tensor(train), {
                shuffle: true,
                ...
                verbose: false <---- turn of verbose reporting  
            })
Jason Mullings
  • 850
  • 14
  • 10