小行星

热爱平淡,向往未知


  • 首页

  • 分类

  • 归档

  • 关于

  • 阅读排行

  • 搜索

save numpy

发表于 2018-06-Sat | 阅读次数:
1
2
3
np.savez(outfile, detections)
npzfile = np.load("detections.save.npz")
print(npzfile["arr_0"])

ubuntu source

发表于 2018-06-Sat | 阅读次数:
1
2
3
4
5
6
7
8
9
10
11
12
13
deb http://cn.archive.ubuntu.com/ubuntu/ willy main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ willy-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ willy-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ willy-backports main restricted universe multiverse
##測試版源
deb http://cn.archive.ubuntu.com/ubuntu/ willy-proposed main restricted universe multiverse
# 源碼
deb-src http://cn.archive.ubuntu.com/ubuntu/ willy main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ willy-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ willy-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ willy-backports main restricted universe multiverse
##測試版源
deb-src http://cn.archive.ubuntu.com/ubuntu/ willy-proposed main restricted universe multiverse
1
2
---
http://mirrors.tuna.tsinghua.edu.cn/ubuntu

The 'packaging' package is required;

发表于 2018-06-Fri | 阅读次数:
1
2
pip uninstall setuptools
pip install setuptools==19.2

tensorflow 保存模型

发表于 2018-06-Fri | 阅读次数:
1
2
3
4
5
|--checkpoint_dir
| |--checkpoint
| |--MyModel.meta
| |--MyModel.data-00000-of-00001
| |--MyModel.index

meta文件

MyModel.meta文件保存的是图结构,meta文件是pb(protocol buffer)格式文件,包含变量、op、集合等。

ckpt文件

ckpt文件是二进制文件,保存了所有的weights、biases、gradients等变量

1
2
MyModel.data-00000-of-00001
MyModel.index

save

1
saver.save(sess, './checkpoint_dir/MyModel',global_step=step,write_meta_graph=False)

load

1
2
new_saver = tf.train.import_meta_graph('./checkpoint_dir/MyModel-1000.meta')
new_saver.restore(sess, tf.train.latest_checkpoint('./checkpoint_dir'))

https://blog.csdn.net/huachao1001/article/details/78501928

python debug失败

发表于 2018-06-Fri | 阅读次数:

禁用ray, 转交控制权

Keyboard Maestro

发表于 2018-06-Fri | 阅读次数:

Keyboard Maestro 入门指南


https://sspai.com/post/36442

aria /etc/aria2/aria2.session, cause: No such file

发表于 2018-06-Fri | 阅读次数:

The error indicates that file /etc/aria2/aria2.session is missing. Create the file, and try again.


https://github.com/aria2/aria2/issues/564

相机pinhole原理

发表于 2018-06-Mon | 阅读次数:

##小孔成像,倒立

两种情况

孔小,没有重叠,图片清晰,同时曝光时间加长,当孔的大小和波长一样的时候会出现衍射
孔大,有重叠,图片不清晰

lens的作用

批量转换图片 webp到png

发表于 2018-06-Mon | 阅读次数:
1
ls | grep .webp | xargs -I {} dwebp {} -o  {}.png

pssh

发表于 2018-06-Sun | 阅读次数:
1
sudo apt-get install pssh

pssh在多个主机上并行地运行命令
-h 执行命令的远程主机列表,文件内容格式[user@]host[:port]
如 test@172.16.10.10:229
-H 执行命令主机,主机格式 user@ip:port
-l 远程机器的用户名
-p 一次最大允许多少连接
-P 执行时输出执行信息
-o 输出内容重定向到一个文件
-e 执行错误重定向到一个文件
-t 设置命令执行超时时间
-A 提示输入密码并且把密码传递给ssh(如果私钥也有密码也用这个参数)
-O 设置ssh一些选项
-x 设置ssh额外的一些参数,可以多个,不同参数间空格分开
-X 同-x,但是只能设置一个参数
-i 显示标准输出和标准错误在每台host执行完毕后

pscp 传输文件到多个hosts,类似scp
pscp -h hosts.txt -l irb2 foo.txt /home/irb2/foo.txt
pslurp 从多台远程机器拷贝文件到本地
pnuke 并行在远程主机杀进程
pnuke -h hosts.txt -l irb2 java
prsync 使用rsync协议从本地计算机同步到远程主机
prsync -r -h hosts.txt -l irb2 foo /home/irb2/foo

1
parallel-rsync -h ~/ray/workers.txt -r ./s_t ~/s_t

http://kumu-linux.github.io/blog/2013/08/12/pssh/

1…343536…59
fangyh

fangyh

最爱的是那苍穹之外的浩渺宇宙

588 日志
4 分类
66 标签
© 2020 fangyh
由 Hexo 强力驱动
|
主题 — NexT.Mist v5.1.3
|本站总访问量次