一只妖孽的逗比人生

我的理想很简单:拥有猴哥的身材,过着八戒的生活。

开启逗比人生

浏览器UA标识收集计划

July 12, 2019, 11:39 a.m.

浏览器UA标识收集计划 以下UA从某网站的真实访问数据筛选去重而来包含操作系统信息的UA(38条) Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Firefox/68.0 Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/2010...

MATLAB画几个子图在同一个图中

June 19, 2019, 6:26 p.m.

>> subplot(231);imagesc(model_0) >> subplot(232);imagesc(model_1) >> subplot(233);imagesc(model_2) >> subplot(234);imagesc(model_3) >> subplot(235);imagesc(model_4) >> subplot(236);imagesc(model_5)

PyTorch tensor 翻转

June 18, 2019, 5:33 p.m.

转自https://discuss.pytorch.org/t/how-to-reverse-a-torch-tensor/382 形状为(10)的tensor翻转 tensor = torch.rand(10) # your tensor # create inverted indices idx = [i for i in range(tensor.size(0)-1, -1, -1)] idx = torch.LongTensor(idx) inverted_tensor = tensor.index_select(0, idx) 形状为(1,10,1)的tensor翻转 tens...

二进制文件转npy文件(Python3)

June 17, 2019, 7:36 p.m.

以下demo只支持float格式,仅提供思路,其他数据类型需自行扩展: import numpy as np import struct def bin2npy(bin_file_path, npy_file_path, type='float'): assert type in ['float'] out_data = [] with open(bin_file_path, mode='rb') as bin_file: in_data = bin_file.read() for i in range(len(in_data)//...

推荐使用 Firefox 访问此站点 | 本地DNS优化 | 友情链接: 张鹏的博客  Web布拉格  杨洋的博客   魏文成博客 | Developed by zhangpeng | Copyright © 2018-2019 hupeng.me