关闭caffe日志输出

原博客搬移到:https://blog.csdn.net/u013171226/article/details/107680326

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

在caffe加载模型的时候会输出一大串log,该log可以通过如下方法关闭

在编译libcaffe.so的时候,在src/caffe/net.cpp Init函数进入的时候加入

fLI::FLAGS_minloglevel=3;

如下所示

template <typename Dtype>
void Net<Dtype>::Init(const NetParameter& in_param) {
  fLI::FLAGS_minloglevel=3;//added by chenhongwei,20200702
  // Set phase from the state.
  phase_ = in_param.state().phase();
...

 

posted @ 2020-07-02 15:45  cumtchw  阅读(205)  评论(0编辑  收藏  举报