Wayne's Blog

  • 首页

  • 归档

  • 标签

  • 站点地图

  • 搜索

ubuntu上安装brew

发表于 2019-09-04

在linux,尤其是无root权限的服务器上安装brew是个挑战。

阅读全文 »

非root环境安装YouCompleteMe

发表于 2019-09-04

在linux,尤其是无root权限的服务器上安装YouCompleteMe也是个挑战。

阅读全文 »

关于系统安装的那些事

发表于 2019-08-29 | 更新于 2019-09-04

系统安装常见的为题应该记录下来。

阅读全文 »

当你作为non-root的Linux用户

发表于 2019-08-29 | 更新于 2019-09-04

当我作为普通用户使用服务器,软件环境却不符合要求时……

阅读全文 »

python_tutorial

发表于 2019-06-27

tuple

  1. a = (5) type(a) = 的问题

关于这个问题有相关的讨论。
一个例子是如果(3+4)*3, 结果把括号中当作tuple来看,岂不是(7,7,7),这显然不是我们想要的。

其更直接的解读是

it is the commas, not the parentheses, that define the tuple.

我们做一个测试

1
2
3
>>> a = 1,2,
>>> type(a)
<class 'tuple'>

ctypes_tutorial

发表于 2019-06-27

https://www.auctoris.co.uk/2017/04/29/calling-c-classes-from-python-with-ctypes/

https://codeday.me/bug/20181031/351321.html

https://windows-hexerror.linestarve.com/q/so49744870-passing-vector-from-a-c-dll-in-python-ctypes

paper-list

发表于 2019-06-24

Conference-Workshop-Following-List

发表于 2019-06-24 | 更新于 2019-07-17
  1. HPCaML
    International Workshop on the Intersection of High Performance Computing and Machine Learning
    HPCaML 2019
    TensorTuner Nelder-Mead (kind of gradient-free optimizer).Find better parameter values, based on configuration space(hyper parameters, input data, hardware, software,etc).
    NUMA-Caffe

  2. C4ML(Compilers for Machine Learning)

  3. OMASE Workshop (Optimization, Modeling, Analysis and Space Exploration)

  1. Automatic Tuning of Whole Applications:A LACSI Symposium Workshop
    2015 Review, ROSE, Empirical Search, POET…
    2016 Spiral, Loop Fusion/Tiling…

arg_parse_tutorial

发表于 2019-06-23

Python

argpase module

Convert a PyTorch model to Tensorflow using ONNX

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import argparse

# Training settings
parser = argparse.ArgumentParser(description='PyTorch MNIST Example')
parser.add_argument('--batch-size', type=int, default=64, metavar='N',
help='input batch size for training (default: 64)')
parser.add_argument('--test-batch-size', type=int, default=1000, metavar='N',
help='input batch size for testing (default: 1000)')
parser.add_argument('--epochs', type=int, default=10, metavar='N',
help='number of epochs to train (default: 10)')
parser.add_argument('--lr', type=float, default=0.01, metavar='LR',
help='learning rate (default: 0.01)')
parser.add_argument('--momentum', type=float, default=0.5, metavar='M',
help='SGD momentum (default: 0.5)')
parser.add_argument('--no-cuda', action='store_true', default=False,
help='disables CUDA training')
parser.add_argument('--seed', type=int, default=1, metavar='S',
help='random seed (default: 1)')
parser.add_argument('--log-interval', type=int, default=10, metavar='N',
help='how many batches to wait before logging training status')

# 这相当于在程序中人工指定一些args的取值
# Train this model with 60 epochs and after process every 300 batches log the train status
args = parser.parse_args(['--epochs', '60', '--log-interval', '300'])
...
train_loader = torch.utils.data.DataLoader(
datasets.MNIST('../data', train=True, download=True,
transform=transforms.Compose([
transforms.ToTensor(),
transforms.Normalize((0.1307,), (0.3081,))
])),
batch_size=args.batch_size, shuffle=True, **kwargs)

gflags

basic_usage

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python
"""Example for basic usage of the flags library."""

from google.apputils import app
import gflags

FLAGS = gflags.FLAGS

# Flag names are globally defined! So in general, we need to be
# careful to pick names that are unlikely to be used by other libraries.
# If there is a conflict, we'll get an error at import time.
gflags.DEFINE_string('name', 'Mr. President', 'your name')
gflags.DEFINE_integer('age', None, 'your age in years', lower_bound=0)
gflags.DEFINE_boolean('debug', False, 'produces debugging output')
gflags.DEFINE_enum('job', 'running', ['running', 'stopped'], 'job status')


def main(argv):
if FLAGS.debug:
print 'non-flag arguments:', argv
print 'Happy Birthday', FLAGS.name
if FLAGS.age is not None:
print 'You are %d years old, and your job is %s' % (FLAGS.age, FLAGS.job)

if __name__ == '__main__':
app.run()

Parallel Computing

发表于 2019-04-23 | 更新于 2019-05-20

本文主要记录一些Parallel Computing范畴的学习教程和相关技巧等。

MPI tutorial

123
Wayne

Wayne

21 日志
12 标签
© 2020 Wayne
由 Hexo 强力驱动 v3.8.0
|
主题 – NexT.Mist v7.0.1