Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
""" | |
We want to run a function asychronously and run a | |
callback function with multiple parameters when it | |
returns! | |
In this example, we are pretending we're analyzing | |
the names and ages of some people. We want to print | |
out: | |
jack 0 |
%% Make everything look better. | |
%% http://tex.stackexchange.com/questions/553/what-packages-do-people-load-by-default-in-latex | |
%% http://www.howtotex.com/packages/9-essential-latex-packages-everyone-should-use/ | |
\usepackage{microtype} | |
%% Shrink space around figures. | |
%% This beats manually adding negative \vspace commands everywhere. | |
%\setlength{\textfloatsep}{0pt} | |
%\setlength{\textfloatsep}{20pt plus 2pt minus 4pt} | |
%\setlength{\textfloatsep}{10pt plus 2pt minus 4pt} |
{0: 'tench, Tinca tinca', | |
1: 'goldfish, Carassius auratus', | |
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias', | |
3: 'tiger shark, Galeocerdo cuvieri', | |
4: 'hammerhead, hammerhead shark', | |
5: 'electric ray, crampfish, numbfish, torpedo', | |
6: 'stingray', | |
7: 'cock', | |
8: 'hen', | |
9: 'ostrich, Struthio camelus', |
{0: u'__background__', | |
1: u'person', | |
2: u'bicycle', | |
3: u'car', | |
4: u'motorcycle', | |
5: u'airplane', | |
6: u'bus', | |
7: u'train', | |
8: u'truck', | |
9: u'boat', |
确定性卷积:(把所有操作的seed=0,以便重现,会变慢) torch.backends.cudnn.deterministic https://oldpan.me/archives/pytorch-conmon-problem-in-training
添加torch.cuda.get_device_name和torch.cuda.get_device_capability实现如下功能。例:
torch.cuda.get_device_name(0) 'Quadro GP100' torch.cuda.get_device_capability(0) (6, 0)