NOTE
liudy95
这个作者很懒,什么都没留下…
展开
-
doxygen C++
doxygen C++注释console.h:/** @file console.h * @brief Function prototypes for the console driver. * * This contains the prototypes for the console * driver and eventually any macros, constants, * or global variables you will need. * * @author H原创 2020-07-14 14:45:48 · 924 阅读 · 0 评论 -
C++ 语言记
这里写自定义目录标题C语言杂记动态生成二维数组C语言杂记动态生成二维数组// 生成一个mxn的矩阵int **B, *Bstorage, i;Bstorage = (int *)malloc(m * n * sizeof(int));B = (int **) malloc(m * sizeof(int *));for (i = 0; i < m; i++) B[i] = &Bstorage[i*n];...原创 2020-05-10 11:04:54 · 385 阅读 · 0 评论 -
Highly Scalable Deep Learning Training System with Mixed-Precision: Training ImageNet in Four Minute
背景Challenge 1: Larger mini-batch size often leads to lower test accuracy, as there exists a generalization gap [^p9].Challenge 2: When using large clusters, it is harder to achieve near-linear scal...原创 2020-03-08 11:20:00 · 367 阅读 · 0 评论 -
interview 知识点
C++ 知识点内联函数inlineinline 和 宏定义#define的作用基本类似,都是替换或者展开。 在程序编译阶段,如果遇到内联函数,则将内联函数的实现在当前位置展开。内联的目的是为了减少函数的调用开销,从而提高运行效率,但会增加代码体量。内联函数的优缺点优点:(1)通过避免函数的回调,加速了程序的执行;(2) 通过利用指令缓存,增强局部访问性;(3)使用内联可以替换重复...原创 2020-02-13 11:58:47 · 499 阅读 · 0 评论 -
Android studio 使用中的问题
gradle 的代理配置问题(gradle sync会出现pom文件下载不成功的问题) 由于gradle不能使用socks代理所以采用Privoxy 进行https代理socks, privoxy(linux) 使用:编辑配置文件/etc/privoxy/config forward-socks5t / 127.0.0.1:1080 .listen-...原创 2018-06-01 17:19:07 · 189 阅读 · 0 评论 -
tensorflow_tips
tensorflow tipstensor实现不是直接采用数组形式,是对运算结果的引用没有真正保存数字,保存的是如何得到这些数字的运算过程属性: name shape type变量是特殊的张量tensor function get_shape tf.assign(w1, w2, validate_shape=False) //赋值改变张量维度Coll...原创 2018-06-20 15:10:04 · 210 阅读 · 0 评论 -
Markdown notes
# &amp;lt;div align=&quot;center&quot;&amp;gt;**Machine Learning Exercise **&amp;lt;/div&amp;gt;&amp;lt;div align=&quot;center&quot;&amp;gt; &amp;lt;div style=&am原创 2018-11-02 16:18:49 · 209 阅读 · 0 评论 -
sh programming example
#!/bin/bashfor dir in `ls train/`do n=0 m=128 for img in `ls train/${dir}` do let "n++" cp "./train/${dir}/${img}" "small/${dir}/${img}" if test $[n] -原创 2019-01-16 14:21:51 · 203 阅读 · 0 评论 -
plotly 画图使用
jupyter 上使用import plotly.plotly as pyimport plotly.graph_objs as gopy.sign_in('用户名', 'API Key') #https://plot.ly 网站上注册获得trace = go.Bar(x=[1, 2], y =[1,2])data = [trace]py.iplot(data)...原创 2019-04-03 19:19:34 · 1015 阅读 · 2 评论 -
Python Note
argparse useimport argparseimport sysdef check_arg(args=None): parser = argparse.ArgumentParser(description='Script to learn basic argparse') parser.add_argument('-H', '--host', ...原创 2019-05-07 09:31:14 · 238 阅读 · 0 评论 -
Chainer use note
estimate array is in GPU or CPUfrom chainer import backendimport chainerimport numpy as npa = chaienr.as_variable(np.ones(shape=(2,2)))xp = backend.get_array_module(a)if xp.__name__ == 'numpy'...原创 2019-05-07 21:55:49 · 205 阅读 · 0 评论 -
Pytorch
一机多卡 数据并行# 假设就一个数据data = torch.rand([16, 10, 5])# 前向计算要求数据都放进GPU0里面# device = torch.device('cuda:0')# data = data.to(device)data = data.cuda()# 将网络同步到多个GPU中model_p = torch.nn.DataParalle(m...原创 2019-05-12 08:31:06 · 191 阅读 · 0 评论 -
Capsule Network
These capsules are particularly good at handling different types of visual stimulus and encoding things like pose (position, size, orientation), deformation, velocity, albedo, hue, texture etc.Capsu...原创 2018-05-27 11:09:49 · 248 阅读 · 0 评论 -
awesome library
Keras: 基于 Python 的深度学习库 Keras 是一个用 Python 编写的高级神经网络 API,它能够以 TensorFlow, CNTK, 或者 Theano 作为后端运行。Keras 的开发重点是支持快速的实验。能够以最小的时延把你的想法转换为实验结果,是做好研究的关键...原创 2018-05-22 15:48:30 · 169 阅读 · 0 评论 -
Docker
docker image ls : list images docker pull 地址/仓库名/标签 : 获取镜像 docker image rm imagename : remove images docker history imagename : view historyThe Basic commands + docker run -h hostname...原创 2018-05-21 10:36:33 · 271 阅读 · 0 评论 -
C 预处理器和C库
可变参数: stdarg.h#include<cstdio>#include<cstdarg>//lim传入的值为传入参数的个数double sum(int lim, ...){ va_list ap; //va_list 代表一种数据对象 double tot = 0; va_start(ap, lim); //初始化 ap 为参数列表 for(int i = 0; i原创 2017-07-12 16:38:45 · 296 阅读 · 0 评论 -
格雷码
格雷码(Gray Code) 在一组数的编码中,若任意两个相邻的代码只有一位二进制数不同,则称这种编码为格雷码(Gray Code),另外由于最大数与最小数之间也仅一位数不同,即“首尾相连”,因此又称循环码或反射码。 假设原始的值从0开始,格雷码产生的规律是: 第一步,改变最右边的位元值; 第二步,改变右起第一个为1的位元的左边位元; 第三步,第四步重复第一步和第二步,直到所有的格雷码产生原创 2017-07-29 15:42:36 · 460 阅读 · 0 评论 -
算法杂记
在n个元素中同时找到最小值和最大值的方法:对输入元素成对的进行处理,现将一对输入元素互相进行比较,再把较小值与最小值比较,较大值跟最大值比较。原创 2017-07-22 09:47:21 · 184 阅读 · 0 评论 -
红黑树
一棵红黑树是满足下面红黑性质的二叉搜索树:每个节点或是红色,或是黑色。根节点是黑色。每个叶节点(NIL)是黑色如果一个节点是红色的,则他的两个子节点都是黑色。对每个节点,从该节点到所有后代节点的简单路径上,均包含数目相同的黑色节点。黑高 : 从某节点x出发(不含该节点)到达一个叶节点的任意一条简单路径上的黑色节点个数称为该节点的黑高。 旋转:这是种能保持二叉搜索树性质的搜索树局部操作。原创 2017-08-09 11:46:34 · 209 阅读 · 0 评论 -
Linux notes(find)
find 指令用法find -name search.txtfind /home -name search.txtfind /home -iname search.txt %不区分大小写查找find 的 -type 參數可以指定檔案的類型,常用的選項有:d:目錄。p:具名的 pipe(FIFO)。f:一般的檔案。l:連結檔,如果與 -L 或 -follow 參數同時使用時,就只會搜尋到原创 2017-08-09 20:17:14 · 199 阅读 · 0 评论 -
Latex note
$6^{-6}$ 表示为 6−66^{-6}原创 2017-08-10 08:49:57 · 847 阅读 · 0 评论 -
C++ 小知识
使用printf 输出%d字符串 printf("%%d");原创 2017-08-10 08:35:05 · 204 阅读 · 0 评论 -
gdb note
* 常见命令* 1. 启动gdb: gdb program OR gdb file program -------------- 2. run // 重新开始程序 --------------原创 2017-08-10 16:50:08 · 242 阅读 · 0 评论 -
拓扑排序
引言 有向无环图(Directed Acyclic Graph, DAG)是有向图的一种,字面意思的理解就是图中没有环。常常被用来表示事件之间的驱动依赖关系,管理任务之间的调度。拓扑排序是对DAG的顶点进行排序,使得对每一条有向边(u, v),均有u(在排序记录中)比v先出现。亦可理解为对某点v而言,只有当v的所有源点均出现了,v才能出现。下图给出有向无环图的拓扑排序: 实现: 拓扑排序的实现原创 2017-08-11 19:38:22 · 360 阅读 · 0 评论 -
walsh函数
walsh函数转载 2017-08-05 12:57:32 · 7669 阅读 · 0 评论 -
spacemaces note
Latex设置xelatex为默认编译方式 Add (setq TeX-engine 'xetex) in dotspacemacs/user-config(); Add dotspacemacs-configuration-layers '((latex :variables latex-build-command "LaTeX"));常用快捷键 C shift原创 2017-06-22 15:23:05 · 970 阅读 · 0 评论 -
python matplotlib 简单使用
Annotation 标注 x0 = 1 y0 = 2*x0 + 1 plt.plot([x0, x0,], [0, y0,], 'k--', linewidth=2.5) plt.scatter([x0, ], [y0, ], s=50, color='b') # method 1: ######...原创 2018-04-10 10:17:49 · 245 阅读 · 0 评论 -
python 笔记
操作符 幂次方操作符 ** 异或操作符 ^原创 2017-07-10 18:44:50 · 205 阅读 · 0 评论