<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>CLH blog</title>
    <description>My GitHub Pages</description>
    <link>https://clhne.github.io/</link>
    <atom:link href="https://clhne.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Tue, 11 Dec 2018 07:32:09 +0000</pubDate>
    <lastBuildDate>Tue, 11 Dec 2018 07:32:09 +0000</lastBuildDate>
    <generator>Jekyll v3.7.4</generator>
    
      <item>
        <title>dpkg command</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#dpkg-命令&quot; id=&quot;markdown-toc-dpkg-命令&quot;&gt;dpkg 命令&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#语法&quot; id=&quot;markdown-toc-语法&quot;&gt;语法&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;dpkg-命令&quot;&gt;dpkg 命令&lt;/h1&gt;
“dpkg ”是“Debian Packager ”的简写。为 “Debian” 专门开发的套件管理系统，方便软件的安装、更新及移除。所有源自“Debian”的“Linux ”发行版都使用 “dpkg”，例如 “Ubuntu”、“Knoppix ”等。  &lt;br /&gt;
dpkg是Debian软件包管理器的基础，它被伊恩·默多克创建于1993年。dpkg与RPM十分相似，同样被用于安装、卸载和供给.deb软件包相关的信息。

&lt;h2 id=&quot;语法&quot;&gt;语法&lt;/h2&gt;

1.Install software. dpkg -i &amp;lt;.deb file name&amp;gt; eg: dpkg -i avg71flm_r28-1_i386.deb    &lt;br /&gt;
2.Install all software. eg: dpkg -R /usr/local/src     &lt;br /&gt;
3.查看已安装的所有软件： dpkg -l | grep ***  &lt;br /&gt;
4.帮助： dpkg -help   &lt;br /&gt;
5.显示包的具体信息： dpkg -p package-name eg: dpkg -p cacti

&lt;hr /&gt;

【Ref】
1.&lt;a href=&quot;https://baike.baidu.com/item/dpkg/9944168&quot;&gt;dpkg百度百科&lt;/a&gt;
</description>
        <pubDate>Tue, 11 Dec 2018 00:00:00 +0000</pubDate>
        <link>https://clhne.github.io/2018/12/11/Linux-command-dpkg/</link>
        <guid isPermaLink="true">https://clhne.github.io/2018/12/11/Linux-command-dpkg/</guid>
        
        <category>Command</category>
        
        
        <category>Linux</category>
        
      </item>
    
      <item>
        <title>CLOC  tool</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#cloc&quot; id=&quot;markdown-toc-cloc&quot;&gt;CLOC&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#ref&quot; id=&quot;markdown-toc-ref&quot;&gt;Ref&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;cloc&quot;&gt;CLOC&lt;/h1&gt;
CLOC Count Lines of Code.   &lt;br /&gt;
cloc counts blank lines, comment lines, and physical lines of source code in many programming languages. Given two versions of a code base, cloc can compute differences in blank, comment, and source lines. It is written entirely in Perl with no dependencies outside the standard distribution of Perl v5.6 and higher (code from some external modules is embedded within cloc) and so is quite portable. cloc is known to run on many flavors of Linux, FreeBSD, NetBSD, OpenBSD, Mac OS X, AIX, HP-UX, Solaris, IRIX, z/OS, and Windows.

&lt;h4 id=&quot;ref&quot;&gt;Ref&lt;/h4&gt;
[1] &lt;a href=&quot;http://cloc.sourceforge.net/&quot;&gt;CLOC&lt;/a&gt;

</description>
        <pubDate>Tue, 04 Dec 2018 09:21:00 +0000</pubDate>
        <link>https://clhne.github.io/2018/12/04/cloc-tools/</link>
        <guid isPermaLink="true">https://clhne.github.io/2018/12/04/cloc-tools/</guid>
        
        <category>Tools</category>
        
        
        <category>Programming</category>
        
      </item>
    
      <item>
        <title>SenseTime HPC</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#sensetime-hpc&quot; id=&quot;markdown-toc-sensetime-hpc&quot;&gt;SenseTime HPC&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#刘文志毕业于中国科学院研究生院现为sensetime异构并行计算部门主管总监曾于2011年至2014年间于英伟达担任并行计算工程师后就职百度深度学习研究院高级研发工程师负责异构计算组日常工作工作期间参与两项美国专利申请已出版并行算法设计与性能优化并行编程方法与优化实践科学计算与企业经应用的并行优化opencl异构并行计算等四本个人著作&quot; id=&quot;markdown-toc-刘文志毕业于中国科学院研究生院现为sensetime异构并行计算部门主管总监曾于2011年至2014年间于英伟达担任并行计算工程师后就职百度深度学习研究院高级研发工程师负责异构计算组日常工作工作期间参与两项美国专利申请已出版并行算法设计与性能优化并行编程方法与优化实践科学计算与企业经应用的并行优化opencl异构并行计算等四本个人著作&quot;&gt;刘文志：毕业于中国科学院研究生院，现为SenseTime异构并行计算部门主管、总监。曾于2011年至2014年间于英伟达担任并行计算工程师。后就职百度深度学习研究院高级研发工程师，负责异构计算组日常工作。工作期间参与两项美国专利申请。已出版《并行算法设计与性能优化》、《并行编程方法与优化实践》、《科学计算与企业经应用的并行优化》、《OpenCL异构并行计算》等四本个人著作。&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#颜深根博士毕业于中国科学院大学现为sensetime主任研究员香港中文大学博士后曾于2013年6月至2014年2月在美国北卡州立大学做访问研究为2015年国际并行处理大会程序委员会委员2015年网络与并行计算国际会议程序委员会委员曾就职于百度深度学习研究院任资深研发工程师博士期间在并行计算领域发表论文多篇曾连续两年以第一作者身份在并行处理顶级国际会议ppopp发表论文大陆唯一硕士期间曾创办自己的公司并盈利几十万元为著名开源计算机视觉库opencvopencl分支的主要贡献者之一opencl异构计算一书译者之一&quot; id=&quot;markdown-toc-颜深根博士毕业于中国科学院大学现为sensetime主任研究员香港中文大学博士后曾于2013年6月至2014年2月在美国北卡州立大学做访问研究为2015年国际并行处理大会程序委员会委员2015年网络与并行计算国际会议程序委员会委员曾就职于百度深度学习研究院任资深研发工程师博士期间在并行计算领域发表论文多篇曾连续两年以第一作者身份在并行处理顶级国际会议ppopp发表论文大陆唯一硕士期间曾创办自己的公司并盈利几十万元为著名开源计算机视觉库opencvopencl分支的主要贡献者之一opencl异构计算一书译者之一&quot;&gt;颜深根：博士毕业于中国科学院大学，现为SenseTime主任研究员，香港中文大学博士后。曾于2013年6月至2014年2月在美国北卡州立大学做访问研究，为2015年国际并行处理大会程序委员会委员，2015年网络与并行计算国际会议程序委员会委员。曾就职于百度深度学习研究院，任资深研发工程师。博士期间在并行计算领域发表论文多篇，曾连续两年以第一作者身份在并行处理顶级国际会议PPoPP发表论文（大陆唯一）。硕士期间曾创办自己的公司并盈利几十万元，为著名开源计算机视觉库（OpenCV）OpenCL分支的主要贡献者之一，《OpenCL异构计算》一书译者之一。&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#孔畅-深圳大学硕士毕业sensetime异构并行计算部门经理师从陈国良院士硕士期间在国家高性能中心深圳分中心研究并行计算和计算机体系结构方向国家研究生奖学金获得者参加国家重大科技项目基于龙芯3b八核处理器的高性能计算机kd-90翻译出版了图书intel-parallel-studio环境下的并行程序设计并发表了多篇学术论文毕业后曾就职于百度idl异构计算组主要研究方向是基于gpu的并行分布式优化技术和深度学习相关算法&quot; id=&quot;markdown-toc-孔畅-深圳大学硕士毕业sensetime异构并行计算部门经理师从陈国良院士硕士期间在国家高性能中心深圳分中心研究并行计算和计算机体系结构方向国家研究生奖学金获得者参加国家重大科技项目基于龙芯3b八核处理器的高性能计算机kd-90翻译出版了图书intel-parallel-studio环境下的并行程序设计并发表了多篇学术论文毕业后曾就职于百度idl异构计算组主要研究方向是基于gpu的并行分布式优化技术和深度学习相关算法&quot;&gt;孔畅： 深圳大学硕士毕业，SenseTime异构并行计算部门经理。师从陈国良院士，硕士期间在国家高性能中心（深圳分中心）研究并行计算和计算机体系结构方向，国家研究生奖学金获得者。参加国家重大科技项目“基于龙芯3B八核处理器的高性能计算机KD-90”，翻译出版了图书《Intel Parallel Studio环境下的并行程序设计》，并发表了多篇学术论文。毕业后曾就职于百度IDL异构计算组，主要研究方向是基于GPU的并行分布式优化技术和深度学习相关算法。&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#高洋-毕业于中国科学院研究生院现为sensetime异构并行计算部门高级经理曾在阿里核心系统部专用计算组担任研发工程师后于百度深度学习研究院担任高级研发工程师&quot; id=&quot;markdown-toc-高洋-毕业于中国科学院研究生院现为sensetime异构并行计算部门高级经理曾在阿里核心系统部专用计算组担任研发工程师后于百度深度学习研究院担任高级研发工程师&quot;&gt;高洋： 毕业于中国科学院研究生院，现为SenseTime异构并行计算部门高级经理。曾在阿里核心系统部专用计算组担任研发工程师，后于百度深度学习研究院担任高级研发工程师。&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#孙刚-中国科学院大学博士现为sensetime视觉计算高级研究员先后在微软亚洲研究院视觉计算组进行研究百度深度学习研究院异构计算组进行研究实习博士期间在计算机视觉领域发表多篇论文在多个公共数据集上取得最好的图像分类结果&quot; id=&quot;markdown-toc-孙刚-中国科学院大学博士现为sensetime视觉计算高级研究员先后在微软亚洲研究院视觉计算组进行研究百度深度学习研究院异构计算组进行研究实习博士期间在计算机视觉领域发表多篇论文在多个公共数据集上取得最好的图像分类结果&quot;&gt;孙刚： 中国科学院大学博士，现为SenseTime视觉计算高级研究员。先后在微软亚洲研究院视觉计算组进行研究、百度深度学习研究院异构计算组进行研究实习。博士期间在计算机视觉领域发表多篇论文，在多个公共数据集上取得最好的图像分类结果。&lt;/a&gt;        &lt;ul&gt;
          &lt;li&gt;&lt;a href=&quot;#ref&quot; id=&quot;markdown-toc-ref&quot;&gt;Ref&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;sensetime-hpc&quot;&gt;SenseTime HPC&lt;/h1&gt;
&lt;h3 id=&quot;刘文志毕业于中国科学院研究生院现为sensetime异构并行计算部门主管总监曾于2011年至2014年间于英伟达担任并行计算工程师后就职百度深度学习研究院高级研发工程师负责异构计算组日常工作工作期间参与两项美国专利申请已出版并行算法设计与性能优化并行编程方法与优化实践科学计算与企业经应用的并行优化opencl异构并行计算等四本个人著作&quot;&gt;刘文志：毕业于中国科学院研究生院，现为SenseTime异构并行计算部门主管、总监。曾于2011年至2014年间于英伟达担任并行计算工程师。后就职百度深度学习研究院高级研发工程师，负责异构计算组日常工作。工作期间参与两项美国专利申请。已出版《并行算法设计与性能优化》、《并行编程方法与优化实践》、《科学计算与企业经应用的并行优化》、《OpenCL异构并行计算》等四本个人著作。&lt;/h3&gt;

&lt;h3 id=&quot;颜深根博士毕业于中国科学院大学现为sensetime主任研究员香港中文大学博士后曾于2013年6月至2014年2月在美国北卡州立大学做访问研究为2015年国际并行处理大会程序委员会委员2015年网络与并行计算国际会议程序委员会委员曾就职于百度深度学习研究院任资深研发工程师博士期间在并行计算领域发表论文多篇曾连续两年以第一作者身份在并行处理顶级国际会议ppopp发表论文大陆唯一硕士期间曾创办自己的公司并盈利几十万元为著名开源计算机视觉库opencvopencl分支的主要贡献者之一opencl异构计算一书译者之一&quot;&gt;颜深根：博士毕业于中国科学院大学，现为SenseTime主任研究员，香港中文大学博士后。曾于2013年6月至2014年2月在美国北卡州立大学做访问研究，为2015年国际并行处理大会程序委员会委员，2015年网络与并行计算国际会议程序委员会委员。曾就职于百度深度学习研究院，任资深研发工程师。博士期间在并行计算领域发表论文多篇，曾连续两年以第一作者身份在并行处理顶级国际会议PPoPP发表论文（大陆唯一）。硕士期间曾创办自己的公司并盈利几十万元，为著名开源计算机视觉库（OpenCV）OpenCL分支的主要贡献者之一，《OpenCL异构计算》一书译者之一。&lt;/h3&gt;

&lt;h3 id=&quot;孔畅-深圳大学硕士毕业sensetime异构并行计算部门经理师从陈国良院士硕士期间在国家高性能中心深圳分中心研究并行计算和计算机体系结构方向国家研究生奖学金获得者参加国家重大科技项目基于龙芯3b八核处理器的高性能计算机kd-90翻译出版了图书intel-parallel-studio环境下的并行程序设计并发表了多篇学术论文毕业后曾就职于百度idl异构计算组主要研究方向是基于gpu的并行分布式优化技术和深度学习相关算法&quot;&gt;孔畅： 深圳大学硕士毕业，SenseTime异构并行计算部门经理。师从陈国良院士，硕士期间在国家高性能中心（深圳分中心）研究并行计算和计算机体系结构方向，国家研究生奖学金获得者。参加国家重大科技项目“基于龙芯3B八核处理器的高性能计算机KD-90”，翻译出版了图书《Intel Parallel Studio环境下的并行程序设计》，并发表了多篇学术论文。毕业后曾就职于百度IDL异构计算组，主要研究方向是基于GPU的并行分布式优化技术和深度学习相关算法。&lt;/h3&gt;

&lt;h3 id=&quot;高洋-毕业于中国科学院研究生院现为sensetime异构并行计算部门高级经理曾在阿里核心系统部专用计算组担任研发工程师后于百度深度学习研究院担任高级研发工程师&quot;&gt;高洋： 毕业于中国科学院研究生院，现为SenseTime异构并行计算部门高级经理。曾在阿里核心系统部专用计算组担任研发工程师，后于百度深度学习研究院担任高级研发工程师。&lt;/h3&gt;

&lt;h3 id=&quot;孙刚-中国科学院大学博士现为sensetime视觉计算高级研究员先后在微软亚洲研究院视觉计算组进行研究百度深度学习研究院异构计算组进行研究实习博士期间在计算机视觉领域发表多篇论文在多个公共数据集上取得最好的图像分类结果&quot;&gt;孙刚： 中国科学院大学博士，现为SenseTime视觉计算高级研究员。先后在微软亚洲研究院视觉计算组进行研究、百度深度学习研究院异构计算组进行研究实习。博士期间在计算机视觉领域发表多篇论文，在多个公共数据集上取得最好的图像分类结果。&lt;/h3&gt;

&lt;h4 id=&quot;ref&quot;&gt;Ref&lt;/h4&gt;
[1] &lt;a href=&quot;https://blog.csdn.net/happytofly/article/details/80121573&quot;&gt;SenseTime（商汤科技）HPC团队：如何实现Caffe训练GoogLeNet加速近14倍&lt;/a&gt;  &lt;br /&gt;
[2] &lt;a href=&quot;https://blog.csdn.net/dQCFKyQDXYm3F8rB0/article/details/78141296&quot;&gt;专访 | 商汤HPC负责人刘文志（风辰）：未来战略的两大方向及招人的4个标准&lt;/a&gt;

</description>
        <pubDate>Tue, 27 Nov 2018 14:25:00 +0000</pubDate>
        <link>https://clhne.github.io/2018/11/27/SenseTime-HPC/</link>
        <guid isPermaLink="true">https://clhne.github.io/2018/11/27/SenseTime-HPC/</guid>
        
        <category>SenseTime</category>
        
        
        <category>HPC</category>
        
      </item>
    
      <item>
        <title>TensorFlow Inference Error</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#tensorflow-inference-error&quot; id=&quot;markdown-toc-tensorflow-inference-error&quot;&gt;TensorFlow Inference Error&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#ref&quot; id=&quot;markdown-toc-ref&quot;&gt;Ref&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;tensorflow-inference-error&quot;&gt;TensorFlow Inference Error&lt;/h1&gt;
When run Tensorflow_Inference.ipynb in ipython, an error occurred:
&lt;blockquote&gt;
  ValueError: Variable resnet_v1_50/conv1/weights already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:  &lt;br /&gt;
File “/home/lc/lcl/py3/lib/python3.6/site-packages/tensorflow/contrib/framework/python/ops/variables.py”, line 277, in variable
    aggregation=aggregation) &lt;br /&gt;
File “/home/lc/lcl/py3/lib/python3.6/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py”, line 182, in func_with_args  &lt;br /&gt;
    return func(*args, **current_args)  &lt;br /&gt;
File “/home/lc/lcl/py3/lib/python3.6/site-packages/tensorflow/contrib/framework/python/ops/variables.py”, line 350, in model_variable   &lt;br /&gt;
    aggregation=aggregation)
&lt;/blockquote&gt;

Solution:    &lt;br /&gt;
Insert the following code at the beginning of the block.

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;tf.reset_default_graph() # To clear the default graph 重置当前的张量图，即清空所有的张量，在ipython中run jupyter notebook代码时，需要重置张量图，否则会报错        
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;img src=&quot;https://i.imgur.com/ZUuXSOk.jpg&quot; alt=&quot;&quot; /&gt;

注：在training的时候，如果是在ipython中运行jupyter notebook，提示如下错误：

&lt;blockquote&gt;
  ValueError: Variable output/kernel already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:  &lt;br /&gt;
File “&lt;ipython-input-87-b55ee4064880&gt;&quot;, line 24, in create_symbol
    logits = tf.layers.dense(drop3, n_classes, name='output')     
File &quot;&lt;timed exec=&quot;&quot;&gt;&quot;, line 8, in &lt;module&gt;     
File &quot;/home/lc/lcl/py3/lib/python3.6/site-packages/IPython/core/magics/execution.py&quot;, line 1238, in time     
    exec(code, glob, local_ns)&lt;/module&gt;&lt;/timed&gt;&lt;/ipython-input-87-b55ee4064880&gt;
&lt;/blockquote&gt;

同样需要加上述代码。

&lt;h3 id=&quot;ref&quot;&gt;Ref&lt;/h3&gt;
[1] &lt;a href=&quot;https://github.com/ilkarman/DeepLearningFrameworks/blob/master/notebooks/Tensorflow_Inference.ipynb&quot;&gt;DeepLearningFrameworks&lt;/a&gt;  &lt;br /&gt;
[2] &lt;a href=&quot;https://github.com/tensorflow/models/tree/master/research/slim&quot;&gt;TensorFlow-Slim image classification model library&lt;/a&gt;   &lt;br /&gt;
[3] &lt;a href=&quot;https://github.com/kratzert/finetune_alexnet_with_tensorflow/issues/8&quot;&gt;Error in notebook: “ValueError: Variable conv1/weights already exists, disallowed. Did you mean to set reuse=True in VarScope” #8&lt;/a&gt;     &lt;br /&gt;
[4] &lt;a href=&quot;https://www.tensorflow.org/api_docs/python/tf/reset_default_graph&quot;&gt;TF API r1.12&lt;/a&gt;  &lt;br /&gt;
[5] &lt;a href=&quot;https://stackoverflow.com/questions/33765336/remove-nodes-from-graph-or-reset-entire-default-graph&quot;&gt;Remove nodes from graph or reset entire default graph&lt;/a&gt;

</description>
        <pubDate>Tue, 20 Nov 2018 17:05:00 +0000</pubDate>
        <link>https://clhne.github.io/2018/11/20/TensorFlow-Inference-Error/</link>
        <guid isPermaLink="true">https://clhne.github.io/2018/11/20/TensorFlow-Inference-Error/</guid>
        
        <category>TensorFlow</category>
        
        
        <category>Deep_learning</category>
        
      </item>
    
      <item>
        <title>Google Colab Demo</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#google-colab-demo&quot; id=&quot;markdown-toc-google-colab-demo&quot;&gt;Google Colab Demo&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#colab-info&quot; id=&quot;markdown-toc-colab-info&quot;&gt;Colab info&lt;/a&gt;        &lt;ul&gt;
          &lt;li&gt;&lt;a href=&quot;#neofetch-info&quot; id=&quot;markdown-toc-neofetch-info&quot;&gt;neofetch info&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;#ref&quot; id=&quot;markdown-toc-ref&quot;&gt;Ref&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;google-colab-demo&quot;&gt;Google Colab Demo&lt;/h1&gt;
About: Google Colab, Google’s free cloud service for AI developers. With Colab, you can develop deep learning applications on the GPU for free.
&lt;h2 id=&quot;colab-info&quot;&gt;Colab info&lt;/h2&gt;
&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;import tensorflow as tf
import keras as ks
from tensorflow.python.client import device_lib
print('TensorFlow version:',tf.__version__)
print('TensorFlow path:',tf.__file__)
print('keras version:',ks.__version__)
print('keras path:',ks.__file__)
print
#!ls ../../
#!cat /proc/cpuinfo
#!cat /proc/meminfo
print('--------------meminfo---------------------')
!free -mh
print('------------------------------------------')
print('--------------disinfo---------------------')
!df -lh
print('------------------------------------------')
#!uname -a
print('--------------sysinfo---------------------')
!lsb_release -a
print('------------------------------------------')

print('--------------GPUinfo---------------------')
!nvidia-smi
device_lib.list_local_devices()
print('------------------------------------------')

print('--------Is GPU Working?-------------------')
print(tf.test.is_gpu_available(cuda_only=False,min_cuda_compute_capability=None))
print(tf.test.gpu_device_name())
print('------------------------------------------')       
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;img src=&quot;https://i.imgur.com/EpgJ6qv.jpg&quot; alt=&quot;&quot; /&gt;

&lt;h4 id=&quot;neofetch-info&quot;&gt;neofetch info&lt;/h4&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#ipython
!apt-get install neofetch
neofetch          
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

Result:   &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/p0o3EOX.jpg&quot; alt=&quot;&quot; /&gt;
&lt;h3 id=&quot;ref&quot;&gt;Ref&lt;/h3&gt;
[1] &lt;a href=&quot;https://medium.com/deep-learning-turkey/google-colab-free-gpu-tutorial-e113627b9f5d&quot;&gt;Google Colab Free GPU Tutorial&lt;/a&gt;  &lt;br /&gt;
[2] &lt;a href=&quot;https://medium.com/tensorflow/training-and-serving-a-realtime-mobile-object-detector-in-30-minutes-with-cloud-tpus-b78971cf1193&quot;&gt;Training and serving a realtime mobile object detector in 30 minutes with Cloud TPUs&lt;/a&gt;   &lt;br /&gt;
[3] &lt;a href=&quot;https://blog.csdn.net/cocoaqin/article/details/79184540&quot;&gt;Google Colab 免费GPU服务器使用教程&lt;/a&gt;         &lt;br /&gt;
[4] &lt;a href=&quot;https://github.com/clhne/colab_demo&quot;&gt;code&lt;/a&gt;
</description>
        <pubDate>Mon, 12 Nov 2018 12:47:00 +0000</pubDate>
        <link>https://clhne.github.io/2018/11/12/CV-Colab-Demo/</link>
        <guid isPermaLink="true">https://clhne.github.io/2018/11/12/CV-Colab-Demo/</guid>
        
        <category>CV</category>
        
        
        <category>Computer_Vision</category>
        
      </item>
    
      <item>
        <title>Linux X server</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#linuxs-x-server连不上的解决方法&quot; id=&quot;markdown-toc-linuxs-x-server连不上的解决方法&quot;&gt;Linuxs X server连不上的解决方法&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;linuxs-x-server连不上的解决方法&quot;&gt;Linuxs X server连不上的解决方法&lt;/h1&gt;

&lt;hr /&gt;
&lt;dl&gt;
  &lt;dt&gt;Xshell远程操作服务器出现如果报错：&lt;/dt&gt;
  &lt;dd&gt;cannot connect to X server&lt;/dd&gt;
&lt;/dl&gt;

解决方法：

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;export DISPLAY=:0.0      
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

【Ref】&lt;br /&gt;
[1] &lt;a href=&quot;https://blog.csdn.net/rivarola/article/details/41041931&quot;&gt;export DISPLAY=:0.0的解释&lt;/a&gt;
</description>
        <pubDate>Fri, 02 Nov 2018 16:55:00 +0000</pubDate>
        <link>https://clhne.github.io/2018/11/02/Linux-X-server/</link>
        <guid isPermaLink="true">https://clhne.github.io/2018/11/02/Linux-X-server/</guid>
        
        <category>X-server</category>
        
        
        <category>Linux</category>
        
      </item>
    
      <item>
        <title>Texture and Pattern Recognition of Images</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#texture-and-pattern-recognition-of-images&quot; id=&quot;markdown-toc-texture-and-pattern-recognition-of-images&quot;&gt;Texture and Pattern Recognition of Images&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#dependencies&quot; id=&quot;markdown-toc-dependencies&quot;&gt;Dependencies&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;texture-and-pattern-recognition-of-images&quot;&gt;Texture and Pattern Recognition of Images&lt;/h1&gt;

&lt;hr /&gt;
Image Recognition based on python’s scikit-image package.   &lt;br /&gt;
Result:

&lt;img src=&quot;https://i.imgur.com/VV0CyDm.jpg&quot; alt=&quot;&quot; /&gt;

&lt;h2 id=&quot;dependencies&quot;&gt;Dependencies&lt;/h2&gt;
scikit-image        &lt;br /&gt;
opencv-python   &lt;br /&gt;
argparse  &lt;br /&gt;
numpy  &lt;br /&gt;
imutils   &lt;br /&gt;
scikit-learn

【Ref】&lt;br /&gt;
[1] &lt;a href=&quot;https://www.pyimagesearch.com/2015/12/07/local-binary-patterns-with-python-opencv/&quot;&gt;Local Binary Patterns with Python &amp;amp; OpenCV&lt;/a&gt;    &lt;br /&gt;
[2] &lt;a href=&quot;https://github.com/clhne/face_jlq/tree/master/texture_pattern_recognition&quot;&gt;code&lt;/a&gt;
</description>
        <pubDate>Thu, 01 Nov 2018 10:54:00 +0000</pubDate>
        <link>https://clhne.github.io/2018/11/01/CV-Texture-Pattern-Recognition/</link>
        <guid isPermaLink="true">https://clhne.github.io/2018/11/01/CV-Texture-Pattern-Recognition/</guid>
        
        <category>CV</category>
        
        
        <category>Computer_Vision</category>
        
      </item>
    
      <item>
        <title>Face Detection of Video</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#a-mobilenet-ssd-face-detection-of-video&quot; id=&quot;markdown-toc-a-mobilenet-ssd-face-detection-of-video&quot;&gt;A mobilenet SSD Face Detection of Video&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#features&quot; id=&quot;markdown-toc-features&quot;&gt;Features&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#dependencies&quot; id=&quot;markdown-toc-dependencies&quot;&gt;Dependencies&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;a-mobilenet-ssd-face-detection-of-video&quot;&gt;A mobilenet SSD Face Detection of Video&lt;/h1&gt;

&lt;hr /&gt;
A mobilenet SSD(single shot multibox detector) based face detector with pretrained model provided, powered by tensorflow object detection api, trained by WIDERFACE dataset.

&lt;h2 id=&quot;features&quot;&gt;Features&lt;/h2&gt;
Robust, adapt to different poses, this feature is credit to WIDERFACE dataset, I manually cleaned the dataset to balance the precision and recall trade off.

Parallel, multiple process video processing, can inference multiple input simultaneously, I tested to process 4 videos on a single GPU card at the same time, the speed is still competitive, and there’s still room to accommodate more processes.

&lt;h2 id=&quot;dependencies&quot;&gt;Dependencies&lt;/h2&gt;
Tensorflow &amp;gt; 1.2

Tensorflow object detection api (Please follow the official installation instruction, otherwise, I cannot guarantee that you can run the code)

OpenCV python

【Ref】&lt;br /&gt;
[1] &lt;a href=&quot;https://github.com/clhne/face_jlq/tree/master/face_detection/code/video_face_detection&quot;&gt;Tensorflow Face Detector&lt;/a&gt;    &lt;br /&gt;
[2] &lt;a href=&quot;https://github.com/clhne/face_jlq/tree/master/face_detection/code/video_face_detection&quot;&gt;Video Face Detection&lt;/a&gt;
</description>
        <pubDate>Tue, 30 Oct 2018 15:20:00 +0000</pubDate>
        <link>https://clhne.github.io/2018/10/30/CV-Video-Face-Detection/</link>
        <guid isPermaLink="true">https://clhne.github.io/2018/10/30/CV-Video-Face-Detection/</guid>
        
        <category>CV</category>
        
        
        <category>Computer_Vision</category>
        
      </item>
    
      <item>
        <title>Linux CPU and Memory Info</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#linuxs查询cpu内存等信息&quot; id=&quot;markdown-toc-linuxs查询cpu内存等信息&quot;&gt;Linuxs查询CPU、内存等信息&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;linuxs查询cpu内存等信息&quot;&gt;Linuxs查询CPU、内存等信息&lt;/h1&gt;

&lt;hr /&gt;
Linux查看CPU相关信息：     &lt;br /&gt;
1、CPU相关信息，cat+grep 命令，不需要sudo权限：

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c    #查看CPU信息    
cat /proc/cpuinfo | grep &quot;physical id&quot;| sort| uniq| wc -l  #查看CPU物理个数       
cat /proc/cpuinfo | grep &quot;cpu cores&quot;| uniq           #查看每个物理CPU中core的个数，即核数
cat /proc/cpuinfo | grep &quot;processor&quot;| wc -l			 #查看逻辑CPU个数    
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

结果： &lt;br /&gt;
CPU信息：       		&lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/8VjY6dK.png&quot; alt=&quot;&quot; /&gt;       &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/IbPw4GC.png&quot; alt=&quot;&quot; /&gt;     &lt;br /&gt;
物理CPU个数：     &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/kMQQfbg.png&quot; alt=&quot;&quot; /&gt;    &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/tCMNYQK.png&quot; alt=&quot;&quot; /&gt;    &lt;br /&gt;
每个物理CPU中的core个数：   &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/gKsv2JC.png&quot; alt=&quot;&quot; /&gt;   &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/KBGdxSp.png&quot; alt=&quot;&quot; /&gt;       &lt;br /&gt;
逻辑CPU个数：   &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/Bn3ZGpw.png&quot; alt=&quot;&quot; /&gt;	      &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/GIZZrN5.png&quot; alt=&quot;&quot; /&gt;

2、内存相关信息, dmidecode（sudo用户）命令，可用lshw查看所有硬件摘要信息：

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;lshw   #ls hardware       
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

结果如下：    &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/Ix1IbtC.png&quot; alt=&quot;&quot; /&gt;   &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/8GGpiA1.png&quot; alt=&quot;&quot; /&gt;    &lt;br /&gt;
注： lshw must be run as super user or it will only report partial information.        &lt;br /&gt;
类似的，有lscpu:

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;lscpu        
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

结果：   &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/7xLq8Pi.png&quot; alt=&quot;&quot; /&gt;     &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/1AaNqkV.png&quot; alt=&quot;&quot; /&gt;

【Ref】&lt;br /&gt;
[1] &lt;a href=&quot;https://www.cnblogs.com/emanlee/p/3587571.html&quot;&gt;Linux查看物理CPU个数、核数、逻辑CPU个数&lt;/a&gt;    &lt;br /&gt;
[2] &lt;a href=&quot;https://blog.csdn.net/qq_20641565/article/details/72832273&quot;&gt;查看linux系统的cpu个数线程数量以及型号&lt;/a&gt;  &lt;br /&gt;
[3] &lt;a href=&quot;https://github.com/clhne/Tools/blob/master/Sys_tools/cpu_info_server.sh&quot;&gt;CPU Info source&lt;/a&gt;   &lt;br /&gt;
[4] &lt;a href=&quot;https://linux.die.net/man/1/lshw&quot;&gt;lshw&lt;/a&gt;    &lt;br /&gt;
[5] &lt;a href=&quot;https://www.cnblogs.com/clphp/p/6399119.html&quot;&gt;Linux下lshw,lsscsi,lscpu,lsusb,lsblk硬件查看命令&lt;/a&gt;
</description>
        <pubDate>Fri, 15 Jun 2018 09:17:00 +0000</pubDate>
        <link>https://clhne.github.io/2018/06/15/Linux-CPU-Mem/</link>
        <guid isPermaLink="true">https://clhne.github.io/2018/06/15/Linux-CPU-Mem/</guid>
        
        <category>CPU_Memory_info</category>
        
        
        <category>Linux</category>
        
      </item>
    
      <item>
        <title>Python os model</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#python-os-模块&quot; id=&quot;markdown-toc-python-os-模块&quot;&gt;Python os 模块&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;python-os-模块&quot;&gt;Python os 模块&lt;/h1&gt;

&lt;hr /&gt;
Python的os模块包含各种操作系统功能的接口，同时也提供了丰富的文件和目录处理方法。现对常用的方法总结如下：      &lt;br /&gt;
1、os.name 显示正在使用的平台，Windows为“nt”，linux/Unix为“posix”。

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;import os
print os.name # python 2.x 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

在Windows和Linux/Ubuntu14.04 64bit下的运行结果如下：    &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/2CJpDpA.png&quot; alt=&quot;&quot; /&gt;    &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/WfBEdD6.png&quot; alt=&quot;&quot; /&gt;    &lt;br /&gt;
另，Linux/Unix Python 还支持os.uname()，返回详细的系统信息(sysname, nodename, release, version, machine)：     &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/vvjAKio.png&quot; alt=&quot;&quot; /&gt;   &lt;br /&gt;
sys模块中也有类似的方法，sys.platform返回更加详细的信息，Windows返回系统的位数，Linux返回内核的版本：    &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/W9J5xlr.png&quot; alt=&quot;&quot; /&gt;    &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/eYSddrT.png&quot; alt=&quot;&quot; /&gt;     &lt;br /&gt;
2、os.listdir(path)列出path目录下的文件，Linux和Windows的path命令不同：

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;import os
print os.listdir('/home')    # Linux
print os.listdir('f:\\')     #Windows 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

结果： &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/6ktVwhg.png&quot; alt=&quot;&quot; /&gt; 
&lt;img src=&quot;https://i.imgur.com/pequqa2.png&quot; alt=&quot;&quot; /&gt;  &lt;br /&gt;
3、os.remove(filename)删除filename文件：

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;import os    
os.remove('12.txt')   
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

结果：

&lt;img src=&quot;https://i.imgur.com/pjOKypc.png&quot; alt=&quot;&quot; /&gt;    &lt;br /&gt;
4、os.getcwd()返回当前工作目录：

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;import os     
print os.getcwd()     
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

结果：

&lt;img src=&quot;https://i.imgur.com/5Lu1ytA.png&quot; alt=&quot;&quot; /&gt;   &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/rCvnZ7T.png&quot; alt=&quot;&quot; /&gt;   &lt;br /&gt;
另，列出当前目录下的所有文件：

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;import os    
print os.listdir(os.getcwd())       结果：    
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;img src=&quot;https://i.imgur.com/bRmGgl6.png&quot; alt=&quot;&quot; /&gt;          &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/ZLhqPGI.png&quot; alt=&quot;&quot; /&gt;

5、os.getenv(‘env_name’), os.putenv(‘env_name’)读取和设置环境变量：

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;import os    
print os.getenv('OS') # Windows    
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

结果：

&lt;img src=&quot;https://i.imgur.com/SvFZBkP.png&quot; alt=&quot;&quot; /&gt;

6、os.system()用来运行shell命令：

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;import os
os.system('date')       
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

结果：

&lt;img src=&quot;https://i.imgur.com/onys8sA.png&quot; alt=&quot;&quot; /&gt;  &lt;br /&gt;
&lt;img src=&quot;https://i.imgur.com/32a4s9N.png&quot; alt=&quot;&quot; /&gt;

7、others:

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;import os      
os.linesep 		 #显示行终止符，Windows为'\r\n', Linix为'\n',Mac为'\r'            
os.path.split('/home/tmp/test.txt')  #分割目录名和文件名 输出为（'/home/tmp','test.txt')        
os.path.isfile(path)   #if is file, return True, else False        
os.path.isdir(path)    #if is dir, return True, else False          
os.path.existe(path)   #path existe or not?     
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Wed, 13 Jun 2018 14:14:00 +0000</pubDate>
        <link>https://clhne.github.io/2018/06/13/Python-os/</link>
        <guid isPermaLink="true">https://clhne.github.io/2018/06/13/Python-os/</guid>
        
        <category>python_os</category>
        
        
        <category>Python</category>
        
      </item>
    
  </channel>
</rss>
