Skip to content

Instantly share code, notes, and snippets.

View lartpang's full-sized avatar
💪
Completing a Ph.D...

Pang lartpang

💪
Completing a Ph.D...
View GitHub Profile
@HudsonHuang
HudsonHuang / Pytorch performance guide.md
Last active March 25, 2020 02:43
Pytorch performance guide
  1. Using CUDA in correct way:
  • 确定性卷积:(把所有操作的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)

@AruniRC
AruniRC / ms_coco_classnames.txt
Created March 5, 2018 20:37
Class Names of MS-COCO classes in order of Detectron dict
{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',
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active April 30, 2024 12:39
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{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',
@Glench
Glench / python-async-callback.py
Last active August 2, 2021 10:34
An example of how to vary a parameter for an async callback function in python. Hint: don't use lambda functions in loops!
"""
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
@willurd
willurd / web-servers.md
Last active April 28, 2024 21:38
Big list of http static server one-liners

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.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000