How to redirect TensorFlow logging to a file?

后端 未结 4 859
无人及你
无人及你 2021-02-01 04:14

I\'m using TensorFlow-Slim, which has some useful logging printed out to console by tf.logging. I would like to redirect those loggings to a text file, but couldn\'

4条回答
  •  情话喂你
    2021-02-01 04:46

    If you are using python logging in your project, one of the option will be to define the logger with name "tensorflow" in a logging config file.

    Then _logger = _logging.getLogger('tensorflow') will use the logger and specified handlers from your config file.

提交回复
热议问题