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
| #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
| 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
| # 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 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 | |
| """ |
Here's my experience of installing the NVIDIA CUDA kit 8.0 on a fresh install of Ubuntu Desktop 16.04.3 LTS.
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
| # https://github.com/pytorch/vision/blob/master/torchvision/models/__init__.py | |
| import argparse | |
| import os | |
| import shutil | |
| import time | |
| import os, sys, pdb, shutil, time, random, datetime | |
| import torch | |
| import torch.nn as nn | |
| import torch.nn.parallel |
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
| # https://github.com/pytorch/vision/blob/master/torchvision/models/__init__.py | |
| import argparse | |
| import os | |
| import shutil | |
| import time | |
| import os, sys, pdb, shutil, time, random, datetime | |
| import torch | |
| import torch.nn as nn | |
| import torch.nn.parallel |
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
| => creating model 'simplenetv1_imagenet_3p' | |
| => Model : simplenetv1_imagenet_3p( | |
| (features): Sequential( | |
| (0): Conv2d(3, 64, kernel_size=[3, 3], stride=(2, 2), padding=(1, 1)) | |
| (1): BatchNorm2d(64, eps=1e-05, momentum=0.05, affine=True) | |
| (2): ReLU(inplace) | |
| (3): Conv2d(64, 128, kernel_size=[3, 3], stride=(2, 2), padding=(1, 1)) | |
| (4): BatchNorm2d(128, eps=1e-05, momentum=0.05, affine=True) | |
| (5): ReLU(inplace) | |
| (6): Conv2d(128, 128, kernel_size=[3, 3], stride=(1, 1), padding=(1, 1)) |
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
| workbench.main.js:3272 [Extension Host] debugger listening on port 16367 | |
| workbench.main.js:3270 Extension Host | |
| workbench.main.js:3270 Debugger listening on ws://127.0.0.1:16367/d86fbd32-94fb-45fe-a384-4880d4073811 | |
| For help, see: https://nodejs.org/en/docs/inspector | |
| workbench.main.js:238 [Extension Host] [vscode-icons] v8.7.0 activated! | |
| workbench.main.js:238 [Extension Host] (node:8044) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. | |
| t.log @ workbench.main.js:238 | |
| workbench.main.js:238 [Extension Host] Info Python Extension: 2019-06-04 01:29:01: Display locator refreshing progress, Class name = p, completed in 1ms, , Return Value: undefined | |
| workbench.main.js:238 [Extension Host] Info Python Extension: 2019-06-04 01:29:01: Notify locators are locating, Class name = p, completed in 2ms, , Return Value: undefined |