资源简介
FPGA的CNN网络加速代码,重磅资源,亲侧可用的,讲述了使用HLS写入深度学习CNN的推断部分加速代码,网络通用性高。
代码片段和文件信息
function [legend_hobject_hplot_htext_strings] = columnlegend(numcolumns str varargin)
%
% columnlegend creates a legend with a specified number of columns.
%
% columnlegend(numcolumns str varargin)
% numcolumns - number of columns in the legend
% str - cell array of strings for the legend
%
% columnlegend(... ‘Location‘ loc)
% loc - location variable for legend default is ‘NorthEast‘
% possible values: ‘NorthWest‘ ‘NorthEast‘ ‘SouthEast‘ ‘SouthWest‘
%
% columnlegend(... ‘boxon‘)
% columnlegend(... ‘boxoff‘)
% set legend bounding box on/off
%
% example:
% legend_str = [];
% for i=1:10
% x = 1:i:(10*i);
% plot(x); hold on;
% legend_str = [legend_str; {num2str(i)}];
% end
% columnlegend(3 legend_str ‘Location‘ ‘NorthWest‘);
%
%
% Author: Simon Henin
%
% 4/09/2013 - Fixed bug with 3 entries / 3 columns
% 4/09/2013 - Added bounding box option as per @Durga Lal Shrestha (fileexchage)
%
% 22/7/2016 - Edited by davidgs for FontName Handling
location = ‘NorthEast‘;
boxon = false;
fontsize=[];
fontname=‘‘;
for i=1:length(varargin)
switch lower(varargin{i})
case ‘location‘
location = varargin{i+1};
case ‘boxon‘
boxon = true;
case ‘boxoff‘
boxon = false;
case ‘fontsize‘
fontsize=varargin{i+1};
case ‘fontname‘
fontname=varargin{i+1};
end
end
%create the legend
%[legend_hobject_hplot_htext_strings] = legend(str);
%create the legend
[legend_hobject_hplot_htext_strings] = legend(str);
legendT=findobj(object_h‘Type‘‘Text‘);
if ~isempty(fontsize) & isnumeric(fontsize)
set(legendT‘FontSize‘fontsize);
end
if ~isempty(fontname)
set(legendT‘FontName‘fontname);
end
%some variables
numlines = length(str);
numpercolumn = ceil(numlines/numcolumns);
%get old width new width and scale factor
pos = get(legend_h ‘position‘);
width = numcolumns*pos(3);
rescale = pos(3)/width;
%get some old values so we can scale everything later
xdata = get(object_h(numlines+1) ‘xdata‘);
ydata1 = get(object_h(numlines+1) ‘ydata‘);
ydata2 = get(object_h(numlines+3) ‘ydata‘);
%we‘ll use these later to align things appropriately
sheight = ydata1(1)-ydata2(1); % height between data lines
height = ydata1(1); % height of the box. Used to top margin offset
line_width = (xdata(2)-xdata(1))*rescale; % rescaled linewidth to match original
spacer = xdata(1)*rescale; % rescaled spacer used for margins
%put the legend on the upper left corner to make initial adjustments easier
loci = get(gca ‘position‘);
set(legend_h ‘position‘ [loci(1) pos(2) width pos(4)]);
col = -1;
for i=1:numlines
if (mod(inumpercolumn)==1 || (numpercolumn == 1))
col = col+1;
end
if i==1
linenum = i+numlines;
else
- 上一篇:全国省级、地市级、县市级行政区划shp新.zip
- 下一篇:缓冲区查询
相关资源
- 黑金AX7102开发教程
- 01_ALINX_ZYNQ_MPSoC(AXU3CG)逻辑开发教程
- fpga学习资料fpga学习资料
- 基于FPGA的OLED液晶显示
- CNN交通标志识别GTSRB_源码和ppt
- Xilinx PCIe BMD XAPP1053罪行最新版
- 一个关于DPSK收发的完整FPGA工程代码,
- FPGA实现DDS正弦波、方波、三角波发生
- 基于verilog的带fifo的串口设计
- FPGA实战真经100例
- eyeriss项目组的深度学习加速器的总结
- cifar10_cnn 模型文件
- 基于DE2-115的数字示波器
- 《FPGA应用开发入门与典型》文字版超
- 基于FPGA的视频采集系统
- FPGA cyclone4-handbook 数据手册
- RCNN系列论文
- 开源FPGA比特比挖矿
- MTCNN+人脸动态贴纸源码+DEMO
- 基于FPGA的单周期处理器设计MIPS指令集
- 黑金AX7102开发板Verilog教程.pdf
- 最全的FPGA俄罗斯方块包含5个版本的完
- 基于xapp1052pcie工程s6BMD.rar
- 谐波电能计量算法及其FPGA实现_毕明科
- [fpga][ax301][verilog]彩灯显示控制
- 基于FPGA的均值滤波本人上传所有资源
- 数字信号处理的FPGA实现第4版书内代码
- Xilinx FPGA开发实用教程 第2版(完整版
- FPGA设计的实战演练 高级技巧篇.zip
- 米联的FPGA开发例程很详细
评论
共有 条评论