自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(32)
  • 收藏
  • 关注

原创 proposal相关问题

proposal 存表时存的ycenter, xcenter, h, w, 和ty,tx, th, tw分别是什么,其中,ty, tx, th, tw还由get_proposal_lut这个查找表经exp转换(heightweight?)得来 --》dw and dh is the log-scale relative correction factor for the width and height?为什么get_proposal_lut要除以一个常数->据说是把方差考虑进去?–>归一化.

2021-03-18 10:51:18 150

原创 RPN及object detection相关

region proposal 网络(RPN)在最后卷积得到的特征图上,使用一个 3x3 的窗口在特征图上滑动,然后将其映射到一个更低的维度上(如 256 维),在每个滑动窗口的位置上,RPN 都可以基于 k 个固定比例的 anchor box(默认的边界框)生成多个可能的区域。每个 region proposal 都由两部分组成:a)该区域的 objectness 分数。b)4 个表征该区域边界框的坐标。一旦我们有了 region proposal,我们就直接把他们输入一个本质上

2021-03-11 14:59:37 190

原创 IR checker

2021-03-03 17:43:58 148 1

原创 头文件

头文件路径sys.path.append(os.getcwd())

2021-01-22 16:40:38 67

原创 GBuilder Plugin

2021-01-21 19:25:25 148

原创 Git相关命令

du -ah --max-depth=1查看文件大小ln -s 软连接

2021-01-19 11:22:46 50

原创 chmod用法

# 修改文件夹下所有文件为可读可写可执行chmod -R 777 文件夹路径#修改文件夹下所有文件为可读可执行chmod -R 755 文件夹路径#-R参数是递归处理目录下的所有文件以及子文件夹操作文件或目录的用户,有3种不同类型:文件所有者、群组用户、其他用户...

2021-01-14 10:28:20 94

原创 simulator相关

cd /project/ai/scratch01/GBuilderpip install xxx --user在自己的目录下新建文件夹,将cfg和input.bin放入文件夹下gvim cfg文件setenv LD_LIBRARY_PATH /project/ai/scratch01/AIPU_SIMULATOR/lib/:$LD_LIBRARY_PATH~/.local/bin/aipubuild mobilenet_v2_ssdZ1_0904run.cfg...

2021-01-12 17:52:03 241

原创 2021-01-06学习笔记

未来1月任务看gbuilder部分的代码,(主要是src下面的代码)aipubuilder:由parser,aqt,gbuilder组成主路径:AIPU_building_tool_designaipubuider:python 路径下Auto_quantization, Parser, 等文件夹中存储cfg,dataset等文件src下的AIPUBuilder存储AutoQuantizationTool,Parser,(Optimizer)等具体代码src路径下builder

2021-01-06 19:38:17 88

原创 2020-1-5学习笔记

aqt里的函数真是纷繁复杂。。test_each_layer_error,用来逐层debug数据类型转换:astype明天弄懂:该函数内的数据流向,如何得到int8和float32的数据(尤其怎么把int8的数据引出来),aqt.sess_run等等今日时间:交接:1/4发呆玩手机:1/4研究代码想着怎么debug: 1/2...

2021-01-05 19:37:25 67

原创 2021-01-04学习笔记

在dataset.py中,538行 write_tfrecords将数据写进./tmp里生成data.tfrecordaqt通过ir生成计算图来调用forward函数产生结果,其中,若有calibration_data和calibration_label,用calibration_data来产生量化参数若无calibration_data和calibration_label,用data,label来量化并测试ts_min_file, ts_max_file的优先级高于calibration_dat

2021-01-05 10:03:59 82

原创 aqt代码整理相关疑问

activation opif self.method_.lower() == 'sigmoid': if self.is_signed: # special process for wavenet o_scale = 127.0 sigRange = o_scale / input_scale xs = np.linspace(-sigRange, sigRange, 2 **q.

2020-11-04 13:55:32 849

原创 graph optimizer选项

Dictionary of experimental optimizer options to configure. Valid keys:layout_optimizer: Optimize tensor layouts e.g. This will try to use NCHW layout on GPU which is faster.constant_folding: Fold constants Statically infer the value of tensors when poss

2020-09-21 17:54:37 301

原创 DAY33(graph optimization跑inception)

查看tensorflow版本pip show tensorflow修改脚本的可执行权限chmod +x test.sh~/.cshrcalias rm 'rm -i'alias cp 'cp -i'alias mv 'mv -i'alias setprompt 'set prompt="%n@%m ${cwd} >"'setprompt# to set the initial promptalias cd 'chdir \!* && setprompt'#set

2020-09-14 11:39:35 108

原创 DAY32(Graph Optimization)

添加.gitignore.gitignore只能忽略那些原来没有被track的文件,如果某些文件已经被纳入了版本管理中,则修改.gitignore是无效的。那么解决方法就是先把本地缓存删除(改变成未track状态),然后再提交git rm -r --cached .git add .git commit -m 'update.gitigore'Grappler OptimizationGrappler是TensorFlow运行时中的默认图形优化系统。 Grappler通过图简化和其他高级优化(

2020-09-09 11:11:27 168

原创 DAY27(Cpp部分asym2sym代码)

testset -eclearif [ ! -d "./bin" ]; then mkdir ./binfiif [ ! -d "./build"]; then mkdir ./buildficd buildmake cleancmake ..make -j20cp ./test/testcase ../bin../bin/testcase 配置python3setenv LD_LIBRARY_PATH /arm/tools/python/python/3.6.5/rhe

2020-09-04 10:45:29 185

原创 DAY29(git相关操作)

###Firefox打开gerrithttp://szc-gerritai02.armchina.com:8080/提交代码git pull origin mastergit checkout developgit rebase mastergit merge develop --squashgit commit -m''#提交前,从master上git pull --rebasegit push origin HEAD:refs/for/master#如有conflictgit

2020-09-03 18:45:07 117

原创 DAY25

BN层在反向传播过程中,每层权重的更新是在假定其他权重不变的情况下,向损失函数降低的方向调整自己。问题在于,在一次反向传播过程中,所有的权重会同时更新,导致层间配合“缺乏默契”,每层都在进行上节所说的“追逐游戏”,而且层数越多,相互配合越困难,文中把这个现象称之为 Internal Covariate Shift为此,希望对每层输入的分布有所控制,于是就有了Batch Normalization,其出发点是对每层的输入做Normalization,只有一个数据是谈不上Normalization的,所以

2020-08-28 20:28:06 138

原创 DAY23(C++代码理解与编译)

mkdir buildcd buildcmake ..make -j16AIPU运行过程offline在Building tool的python文件夹下实现加载好的网络,经过Parser和aqt后用buildtool解析bin文件后,将得到的代码段/数据段等按照cpu的控制放入aipu的不同部分来执行online-在Building tool的src文件夹下构建模型,通过输入graph(移动端支持的Tflite模式)经plugin的.so文件在线训练,并通过调用layer lib(?).

2020-08-28 09:50:30 340

原创 DAY20(Tensorflow学习)

TF里的with语句当with语句执行时,便执行上下文表达式(context_expr)(一般为某个方法)来获得一个上下文管理器对象,上下文管理器的职责是提供一个上下文对象,用于在with语句块中处理细节:一旦获得了上下文对象,就会调用它的enter()方法,将完成with语句块执行前的所有准备工作,如果with语句后面跟了as语句,则用enter()方法的返回值来赋值;当with语句块结束时,无论是正常结束,还是由于异常,都会调用上下文对象的exit()方法,exit()方法有3个参数,如果with语.

2020-08-26 16:40:46 96

原创 DAY16(代码框架)

运行ckpt_to_fzpb文件python3 -m tensorflow.python.tools.freeze_graph --input_checkpoint=./Parser/shuffle_resnet/resnet_v1_50_s_reorder.ckpt --output_graph=./Parser/frozen.pb --output_node_names=resnet_v1_50/block3/unit_6/bottleneck_v1/conv1/BatchNorm/moving_..

2020-08-26 10:56:49 82

原创 DAY19(图优化学习)

FileZilla连接远程服务器szc-sftp01.armchina.com未来两月任务图优化用tensorflow里的grappfer来优化.pb文件,得到.pb文件喂进AQT得到int8输出用TASO的方法优化根据napi文档完善op**您可能会发现自己正在查看长堆栈跟踪,特别是那些引用tf.Graph或with tf.Graph().as_default() 。这意味着您可能正在图形环境中运行。 TensorFlow中的核心功能使用图上下文,例如model.fit()的model.

2020-08-21 10:29:42 111

原创 DAY16&17(.ckpt转.pd跑框架)

ckpt转pdpython3 -m tensorflow.python.tools.freeze_graph --input_checkpoint=./Parser/shuffle_resnet/resnet_v1_50_s_reorder.ckpt --output_graph=./Parser/shuffle_resnet/res_frozen.pb --output_node_names=resnet_v1_50/block3/unit_6/bottleneck_v1/conv1/BatchNorm

2020-08-18 17:22:29 234

原创 DAY14&15(op代码)

input=node_dict[self.bottom_[0]]linear_scale_shift是什么activation opforward 实现激活函数功能quantize method:looking up table(lut)self.lut_[self.qprec] = range (precision_q_min, precision_q_max+1) / input_scaleargminmax opforward 取axis下的min,max不做quanti

2020-08-17 11:27:22 239

原创 DAY12&13(代码框架)

quantizecalibrate_method(‘EXTREME’,‘MEAN’,‘KLD’)calculate_op_statistic_infoself._cal_quantize_statistic_tensor()代码架构:用户喂进经过预处理的.npy文件,data_set.py处理,calibrate 求极值calibration 后得到outputs_min_max, ngamma_min_max, normalized_min_max, 校准weights和bias

2020-08-13 09:20:49 88

原创 DAY11(Concat层具体实现)

DFS 方法找到ancestor遍历ancestor和cur_op 中的idx判断是否某条支路上只有一个pooling层若有,将其加入reference branch若只有一个reference branch,则将其min, max赋给其他branch若有多个reference branch,不做处理若无直接的pooling层,取平均值赋给reference min, max, 用enumerate(near_min_max)将near branch的值设为一样tf.split,

2020-08-11 10:32:47 165

原创 DAY9(Debug 了解代码)

Find concat OPConcatOp (OpNeedsQuantize,OpHasAxis)

2020-08-07 09:49:34 101

原创 DAY7(Concat 任务与实现思路)

Concat (Inception_v3)将concat层连接的op的输出scale强制转化成一样以节省硬件层面计算量从concat层回溯各bottom至base层得到分支结构若有一个单独的pooling层(无scale系数)直接沿用pooling层所用的scale系数若concat多层嵌套不做优化其他沿用一个支路上的scale并赋给其他支路(min,max赋成一样)...

2020-08-05 09:46:51 117

原创 DAY6(Auto_quantization build&quantize)

Auto_quantizationbuild:ir contains net_property and op_list and weights_dictsave net property and op listop attributes initialized with the weight/bias/scale/shift/lut from the IR (???)infer the class num from IRforward parameters(reverse_rgb, prec

2020-08-04 14:49:33 89

原创 Day5(调试工程代码+BN层补充)

调试工程代码在configuration的parameters里添加cfg文件--cfg= #路径名parser.add_argument('--cfg', type=str, required=False, help='The config file.\n')read ir (graph+bin)调用auto_quantization函数(ir, argv)从cfg文件中传入dataset_param, quant_param, calibration_param 等放入AutoQua

2020-08-03 09:29:28 78

原创 DAY4(Quantization&Tensor)

Quantizationmodel choose: quantize model architectures that are already efficient at trading off latency with accuracy.represent weights to binary, ternary and use bit-shift to do multiplication.Quantization values(parameters) to do integer arithmetic

2020-07-30 23:42:48 214

原创 DAY3笔记(Quantization基本知识&Git部分语法)

连接远程服务器ssh c14204 -X -Yssh -X -Y c14204ssh szc-aigpu01 -X -Y-X -Y 显示图形界面source ~/.cshrc~/.cshrc是脚本文件Quantization量化32位的 float IR转为8位 int(以下内容全凭记忆。。)不同层不同的scale系数,针对weights和feature map针对op进行快速算法或查表操作(LUT)插入更多的稀疏数据(使用map遮盖稀疏数据进行计算可以得到更好的效果)混合精度

2020-07-29 23:09:55 196

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除