坑1. r1.5版本的tf若从源码编译,须用pip另外安装tensorboard:
pip install tb-nightly
tensorboard --logdi="./TFlog" 似乎不能识别~符号
否则会有如下报错:
ImportError: cannot import name 'run_main'
下面这个解决方式我没试过:
"python /usr/local/lib/python2.7/dist-packages/tensorboard/main.py --logdir=~~~"
坑2:编译时带上--copt=-march=native可尽量用上cpu特性 避免如下警告:
I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 AVX512F FMA
编译命令
MKLDNN: bazel build--copt -O3 --copt=-DINTEL_MKL_DNN --config=mkl -c opt --copt=-march=native //tensorflow/tools/pip_package:build_pip_package
MKL: bazel build --copt-O3 --config=mkl -c opt --copt=-march=native //tensorflow/tools/pip_package:build_pip_package
EIGEN: bazel build--config=opt --copt=-march=native //tensorflow/tools/pip_package:build_pip_package bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package