Saturday, March 17, 2018

voxnet and shapenet implementation

System:Ubuntu 16.04
NVIDIA Driver Version:390.30
Theano:0.9
python:2.7
Cuda:8.0
Reference:
https://github.com/dimatura/voxnet.git

First Step:
install NVIDIA DRIVER 
system-setting->software updates -> additional drivers->select nvidia driver->apply ->restart
 
Second Step:
install cuda:https://developer.nvidia.com/cuda-80-ga2-download-archive
 dowload deb in your directory, then
  1. `sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb`
  2. `sudo apt-get update`
  3. `sudo apt-get install cuda-8.0`  
  4. 'sudo apt-get install nvidia-cuda-toolkit'
 Third Step:
install voxelnet and dependencies: 
 
sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git
sudo pip install 'Theano<0.9.0'
sudo pip install Lasagne
sudo pip install path.py
# You need CUDA, I assume it is inside /usr/local/cuda-8.0/

export PATH=/usr/local/cuda-8.0/bin:$PATH # based on https://github.com/dnouri/kfkd-tutorial/issues/8
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64/:$LD_LIBRARY_PATH
git clone https://github.com/dimatura/voxnet.git
cd voxnet
sudo pip install --editable .
cd scripts
./download_shapenet10.sh
THEANO_FLAGS='floatX=float32' python train.py config/shapenet10.py shapenet10_train.tar
 
Note:
 
export PATH=/usr/local/cuda-9.1/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-9.1/lib64/:$LD_LIBRARY_PATH 
THEANO_FLAGS='floatX=float32' python train.py config/shapenet10.py trauma02_train.tar
 
If you are using sudo:
 
sudo env PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH THEANO_FLAGS='floatX=float32' 
python train.py config/shapenet10.py trauma02_train.tar
 
or
sudo env PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY THEANO_FLAGS='floatX=float32,device=gpu0,lib.cnmem=1' 
python train.py config/shapenet10.py trauma02_train.tar 
 
 
 
Error Analysis
1. cannot import downsample
If you prefer to use the newest version of Theano, you could alternatively upgrade Lasagne to 
the development version via 
pip install --upgrade https://github.com/Lasagne/Lasagne/archive/master.zip 
 
If still error try to replace downsample to pool as used in newest version of Theano.
 Or downgrade theano and Lasagne to lower version by sudo pip install "theano<0.8" 

Tuesday, January 16, 2018

Matlab安装MinGW-w64编译器

第一步:下载TDM-GCC(注意看清是32位还是64位),TDM-GCC的安装路径不要包括空格; 
http://tdm-gcc.tdragon.net/download 
第二步:新建环境变量MW_MINGW64_LOC,设置为TDM-GCC-64的安装位置; 
第三步:在MATLAB命令行内运行命令setenv(‘MW_MINGW64_LOC’,folder),folder为TDM-GCC的安装位置,要加单引号; 
最后,重启一下MATLAB;

Monday, January 15, 2018

人工智能100


mysqld and httpd automatic start

chkconfig httpd on
chkconfig mysqld on

Starting httpd: (13)Permission denied: httpd: could not open error log file

  1. setenforce 0                  ##设置SELinux 成为permissive模式  
  2. ##setenforce 1 设置SELinux 成为enforcing模式  
  3. #or You can 
  4. vi /etc/selinux/config
  5. # Change SELINUX=enforcing to SELINUX=disabled

Saturday, January 13, 2018

关闭centos6.x启动进度条

使用root用户修改 /boot/grub/grub.conf 文件。
[root@Slyar ~]# vim /boot/grub/grub.conf
找到下面的部分,将"rhgb"去掉,保存即可。其中"rhgb"表示"redhat graphics boot",就是图形进度条模式。而"quiet"表示在启动过程中只显示重要启动信息,类似硬件自检之类的消息不会显示,可以有选择地选用。
kernel /vmlinuz-2.6.32-71.el6.i686 ro root=UUID=697cb0d9-19f6-414a-90a1-5ceb2f40b03d rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=zh_CN.UTF-8 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet