Here's my experience of installing the NVIDIA CUDA kit 8.0 on a fresh install of Ubuntu Desktop 16.04.3 LTS.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#برای نمایش بلادرنگ نمودار ترینینگ و تست ما | |
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 | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dinesh Jayaraman | |
# Based on code by | |
# Authors: Fabian Pedregosa <[email protected]> | |
# Olivier Grisel <[email protected]> | |
# Mathieu Blondel <[email protected]> | |
# Gael Varoquaux | |
# License: BSD 3 clause (C) INRIA 2011 | |
print(__doc__) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#in the name of God the most compassionate the most merciful | |
# added mean subtraction so that, the accuracy can be reported accurately just like caffe when doing a mean subtraction | |
# Seyyed Hossein Hasan Pour | |
# [email protected] | |
# 7/3/2016 | |
# Added Recall/Precision/F1-Score as well | |
# 01/03/2017 | |
# added classification using caffe.classifier, which lets you do oversampling (allows for multiple preprocessing options and crops) + the manual center crop | |
# method. its sloppy at the moment. for some reason, caffe.classifier's predict method, provides less accuracy compared to the caffes test accuracy | |
# the manuall center crop (i.e. the one which uses Caffe.Net, works just well and achieves the same accuracy as Caffe's) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#in the name of God the most compassionate the most merciful | |
# added mean subtraction so that, the accuracy can be reported accurately just like caffe when doing a mean subtraction | |
# Seyyed Hossein Hasan Pour | |
# [email protected] | |
# 7/3/2016 | |
# Added Recall/Precision/F1-Score as well | |
# 01/03/2017 | |
# Added batch processing, not what used to take a minute or so, takes only several seconds! | |
# 07/25/2017 | |
#info: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Seyyed Hossein Hasan Pour | |
# [email protected] | |
# 7/3/2016 | |
# Added Recall/Precision/F1-Score as well | |
# 01/03/2017 | |
#info: | |
#if on windows, one can use these command in a batch file and ease him/her self | |
#REM Calculating Confusing Matrix | |
#python confusionMatrix_convnet_test.py --proto cifar10_deploy.prototxt --model cifar10_.caffemodel --mean mean.binaryproto --lmdb cifar10_test_lmdb | |
#pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#In the name of God | |
#Use this script to convert a binaryproto mean file to an equivalent python npy mean file. | |
#simply use the script like this : | |
#python convert_protomean.py mean.binaryproto mean.npy" | |
import caffe | |
import numpy as np | |
import sys | |
if len(sys.argv) != 3: | |
print "Usage: python convert_protomean.py mean.binaryproto mean.npy" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "wrn_128_v8" | |
layer { | |
name: "Data1" | |
type: "Data" | |
top: "Data1" | |
top: "Data2" | |
include { | |
phase: TRAIN | |
} | |
transform_param { |