“dpkg ”是“Debian Packager ”的简写。为 “Debian” 专门开发的套件管理系统,方便软件的安装、更新及移除。所有源自“Debian”的“Linux ”发行版都使用 “dpkg”,例如 “Ubuntu”、“Knoppix ”等。
dpkg是Debian软件包管理器的基础,它被伊恩·默多克创建于1993年。dpkg与RPM十分相似,同样被用于安装、卸载和供给.deb软件包相关的信息。
1.Install software. dpkg -i <.deb file name> eg: dpkg -i avg71flm_r28-1_i386.deb
2.Install all software. eg: dpkg -R /usr/local/src
3.查看已安装的所有软件: dpkg -l | grep ***
4.帮助: dpkg -help
5.显示包的具体信息: dpkg -p package-name eg: dpkg -p cacti
【Ref】 1.dpkg百度百科
CLOC Count Lines of Code.
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.
[1] CLOC
[1] SenseTime(商汤科技)HPC团队:如何实现Caffe训练GoogLeNet加速近14倍
[2] 专访 | 商汤HPC负责人刘文志(风辰):未来战略的两大方向及招人的4个标准
When run Tensorflow_Inference.ipynb in ipython, an error occurred:
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:
File “/home/lc/lcl/py3/lib/python3.6/site-packages/tensorflow/contrib/framework/python/ops/variables.py”, line 277, in variable aggregation=aggregation)
File “/home/lc/lcl/py3/lib/python3.6/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py”, line 182, in func_with_args
return func(*args, **current_args)
File “/home/lc/lcl/py3/lib/python3.6/site-packages/tensorflow/contrib/framework/python/ops/variables.py”, line 350, in model_variable
aggregation=aggregation)
Solution:
Insert the following code at the beginning of the block.
tf.reset_default_graph() # To clear the default graph 重置当前的张量图,即清空所有的张量,在ipython中run jupyter notebook代码时,需要重置张量图,否则会报错
注:在training的时候,如果是在ipython中运行jupyter notebook,提示如下错误:
ValueError: Variable output/kernel already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:
File “", line 24, in create_symbol logits = tf.layers.dense(drop3, n_classes, name='output') File " ", line 8, in File "/home/lc/lcl/py3/lib/python3.6/site-packages/IPython/core/magics/execution.py", line 1238, in time exec(code, glob, local_ns)
同样需要加上述代码。
[1] DeepLearningFrameworks
[2] TensorFlow-Slim image classification model library
[3] Error in notebook: “ValueError: Variable conv1/weights already exists, disallowed. Did you mean to set reuse=True in VarScope” #8
[4] TF API r1.12
[5] Remove nodes from graph or reset entire default graph
About: Google Colab, Google’s free cloud service for AI developers. With Colab, you can develop deep learning applications on the GPU for free.
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('------------------------------------------')
#ipython
!apt-get install neofetch
neofetch
Result:
[1] Google Colab Free GPU Tutorial
[2] Training and serving a realtime mobile object detector in 30 minutes with Cloud TPUs
[3] Google Colab 免费GPU服务器使用教程
[4] code
解决方法:
export DISPLAY=:0.0
【Ref】
[1] export DISPLAY=:0.0的解释