本步骤能实现用Intel核芯显卡来进行显示, 用NVIDIA GPU进行计算。
安装开发所需要的一些基本包
sudo apt-get install build-essential
sudo apt-get install vim cmake git
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev| layers { | |
| name: "conv1A" | |
| type: CONVOLUTION | |
| bottom: "data" | |
| top: "conv1A" | |
| blobs_lr: 1 | |
| blobs_lr: 2 | |
| weight_decay: 1 | |
| weight_decay: 0 | |
| convolution_param { |
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| # Author: Axel Angel, copyright 2015, license GPLv3. | |
| # added mean subtraction so that, the accuracy can be reported accurately just like caffe when doing a mean subtraction | |
| # Seyyed Hossein Hasan Pour | |
| # Coderx7@Gmail.com | |
| # 7/3/2016 | |
| import sys |
| # Typical setup to include TensorFlow. | |
| import tensorflow as tf | |
| # Make a queue of file names including all the JPEG images files in the relative | |
| # image directory. | |
| filename_queue = tf.train.string_input_producer( | |
| tf.train.match_filenames_once("./images/*.jpg")) | |
| # Read an entire image file which is required since they're JPEGs, if the images | |
| # are too large they could be split in advance to smaller files or use the Fixed |
| #in the name of Allah, the most compassionate the most merciful | |
| #run this scrip under python2. python3 would work, but not prefectly. e.g. running this script and setting oversample to true in | |
| #net.predict([input_image], oversample=True) will cause a crash. but it works just fine under python2. | |
| import numpy as np | |
| import os, sys, getopt | |
| # Main path to your caffe installation | |
| caffe_root = '/path/to/your/caffe/' | |
| # Model prototxt file |
| import argparse | |
| import time | |
| start_time=time.time(); | |
| ################## Argument Parsing ##################################### | |
| parser=argparse.ArgumentParser(); | |
| parser.add_argument('-s','--solver', default='', type=str); # if empty, solver is created, else read | |
| parser.add_argument('-res', '--resume_from', default='', type=str); #if not empty, resumes training from given file | |
| parser.add_argument('-ft', '--finetune_from', default='', type=str); |
| # Dinesh Jayaraman | |
| # Based on code by | |
| # Authors: Fabian Pedregosa <fabian.pedregosa@inria.fr> | |
| # Olivier Grisel <olivier.grisel@ensta.org> | |
| # Mathieu Blondel <mathieu@mblondel.org> | |
| # Gael Varoquaux | |
| # License: BSD 3 clause (C) INRIA 2011 | |
| print(__doc__) |
| #برای نمایش بلادرنگ نمودار ترینینگ و تست ما | |
| import numpy as np | |
| from matplotlib import pyplot as plt | |
| class LivePlotNotebook(object): | |
| """ | |
| Live plot using %matplotlib notebook in jupyter notebook | |
| original url : https://gist.github.com/wassname/04e77eb821447705b399e8e7a6d082ce | |
| """ |
In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
Here's my experience of installing the NVIDIA CUDA kit 8.0 on a fresh install of Ubuntu Desktop 16.04.3 LTS.