[TOC]
References
tensorflow logging 存到文件里
把tensorflow logging输出到文件里面去
tensorflow生成日志文件
tensorflow log 控制
logging - 如何将TensorFlow日志记录重定向到文件?
TF Boys必看:TensorFlow调试入门指南
TensorFlow 控制流程
tf.logging用法
https://www.w3cschool.cn/tensorflow_python/tensorflow_python-2s9x2w1v.html
https://www.jianshu.com/p/249e9913d22c
https://www.w3cschool.cn/tensorflow_python/tensorflow_python-csdb2wc0.html
python logging 同时输出两个文件
https://segmentfault.com/q/1010000015753168/a-1020000015753651
python os 查找文件 复制文件
https://blog.csdn.net/u010189308/article/details/79806906
https://blog.csdn.net/DamonRush/article/details/53434449
tensorflow 禁用 gpu
https://www.cnblogs.com/jfdwd/p/11225748.html
https://blog.csdn.net/dlhlSC/article/details/77100435
https://blog.csdn.net/qq_35203425/article/details/92579381
tensorflow 2.0 logging 模块
https://blog.csdn.net/weixin_37598106/article/details/87929697
https://mlog.club/article/1494959
python ls grep
https://stackoverflow.com/questions/12845288/grep-on-elements-of-a-list
markdown 锚点
https://my.oschina.net/antsky/blog/1475173
服务器 终端连接反应慢 非root
https://blog.csdn.net/PlatoWG/article/details/80176115
加速 效率 怎么算
https://baike.baidu.com/item/%E5%8A%A0%E9%80%9F%E6%AF%94
https://zh.wikipedia.org/wiki/%E5%8A%A0%E9%80%9F%E6%AF%94
https://python-parallel-programmning-cookbook.readthedocs.io/zh_CN/latest/chapter1/06_How_to_evaluate_the_performance_of_a_parallel_program.html
禁用GPU版本TensorFlow
禁用GPU版本TensorFlow,切换到CPU版本TensorFlow。
如果安装了GPU,默认使用GPU版本的TensorFlow
禁用gpu版本TensorFlow,因为CUDA号码从0开始,这里直接让CUDA使用-1的GPU,自然就无法使用gpu了。
代码前面加入:
import os
os.environ["CUDA_VISIBLE_DEVICES"]="-1"
import tensorflow as tf
Environment Variable Syntax Results
CUDA_VISIBLE_DEVICES=1 Only device 1 will be seen
CUDA_VISIBLE_DEVICES=0,1 Devices 0 and 1 will be visible
CUDA_VISIBLE_DEVICES="0,1" Same as above, quotation marks are optional
CUDA_VISIBLE_DEVICES=0,2,3 Devices 0, 2, 3 will be visible; device 1 is masked
tf 默认 logging.formatter
tf.logging formatter 默认
https://github.com/tensorflow/tensorflow/blob/33bb4fe143bf5f2d83343ca427afa314f84eb963/tensorflow/python/platform/tf_logging.py
import logging as _logging
# Add the output handler.
_handler = _logging.StreamHandler(_logging_target)
_handler.setFormatter(_logging.Formatter(_logging.BASIC_FORMAT, None))
logger.addHandler(_handler)