主要内容

部署

类:dlhdl.Workflow
包:dlhdl

指定的神经网络部署到目标FPGA板

描述

例子

部署(workflowObject)项目指定的目标板的比特流,部署学习网络。

输入参数

全部展开

工作流程,指定为一个dlhdl.Workflow对象。

例子

全部展开

部署VGG-19英特尔®Arria®10 SoC开发工具包数据类型。

部署函数开始编程的FPGA器件,显示进度信息,所花费的时间部署网络。

  1. snet = vgg19;hTarget = dlhdl.Target (“英特尔”);hW = dlhdl.Workflow (“网络”snet,“比特流”,“arria10soc_single”,“目标”,hTarget);hW.deploy

  2. # # #编程的FPGA比特流使用JTAG…# # #编程的FPGA比特流已成功完成。_________________ tableOut = offset_name offset_address allocated_space _______________________ * * *“InputDataOffset”“0 x00000000”“24.0 MB”“OutputResultOffset”“0 x01800000”“4.0 MB”“SystemBufferOffset”“0 x01c00000”“52.0 MB”“InstructionDataOffset”“0 x05000000”“20.0 MB”“ConvWeightDataOffset”“0 x06400000”“276.0 MB”“FCWeightDataOffset”“0 x17800000”“472.0 MB”“EndOffset”“0 x35000000”“总:848.0 MB”# # #装载重量FC的处理器。# # # 4%完成,当前时间是14 - 2020年6月——18:31:07。# # # 8%完成,当前时间是14 - 2020年6月——18:31:32。# # # 12%完成,当前时间是14 - 2020年6月——18:31:58。# # # 16%完成,当前时间是14 - 2020年6月——18:32:23。# # # 20%完成,当前时间是14 - 2020年6月——18:32:48。# # # 24%完成,当前时间是14 - 2020年6月——18:33:13。# # # 28%完成,当前时间是14 - 2020年6月——18:33:39。 ### 32% finished, current time is 14-Jun-2020 18:34:04. ### 36% finished, current time is 14-Jun-2020 18:34:30. ### 40% finished, current time is 14-Jun-2020 18:34:56. ### 44% finished, current time is 14-Jun-2020 18:35:21. ### 48% finished, current time is 14-Jun-2020 18:35:46. ### 52% finished, current time is 14-Jun-2020 18:36:11. ### 56% finished, current time is 14-Jun-2020 18:36:36. ### 60% finished, current time is 14-Jun-2020 18:37:02. ### 64% finished, current time is 14-Jun-2020 18:37:27. ### 68% finished, current time is 14-Jun-2020 18:37:52. ### 72% finished, current time is 14-Jun-2020 18:38:17. ### 76% finished, current time is 14-Jun-2020 18:38:43. ### 80% finished, current time is 14-Jun-2020 18:39:08. ### 84% finished, current time is 14-Jun-2020 18:39:33. ### 88% finished, current time is 14-Jun-2020 18:39:58. ### 92% finished, current time is 14-Jun-2020 18:40:23. ### 96% finished, current time is 14-Jun-2020 18:40:48. ### FC Weights loaded. Current time is 14-Jun-2020 18:41:06
  1. 在当前工作目录中创建一个文件getLogoNetwork.m。这些线输入到文件:

    函数网= = getLogoData getLogoNetwork数据;网= data.convnet;结束函数data = getLogoData如果~ isfile (“LogoNet.mat”)url =“//www.tianjin-qmedu.com/万博1manbetxsupportfiles/gpucoder/cnn_models/logo_detection/LogoNet.mat”;websave (“LogoNet.mat”url);结束data =负载(“LogoNet.mat”);结束
  2. 创建一个图像数据存储和70%的图像分割成一组训练数据和30%的图像验证数据集。

    curDir = pwd;newDir = fullfile (matlabroot,“例子”,“deeplearning_shared”,“数据”,“logos_dataset.zip”);拷贝文件(newDir curDir);解压缩(“logos_dataset.zip”);imd = imageDatastore (“logos_dataset”,“IncludeSubfolders”,真的,“LabelSource”,“foldernames”);[imdsTrain, imdsValidation] = splitEachLabel (imd, 0.7,“随机”);

  3. 创建一个dlhdl.Workflow对象的量化LogoNet作为网络的参数,zcu102_int8比特流,hTarget作为目标参数。

    数字转换网络,你需要的产品列下s manbetx 845FPGA量化工作流先决条件

    %保存pretrained SeriesNetwork对象snet = getLogoNetwork;%创建一个目标对象和定义接口,目标板hTarget = dlhdl.Target (“Xilinx”,“界面”,“以太网”);%创建一个量化的网络对象dlquantObj = dlquantizer (snet,“ExecutionEnvironment”,FPGA的);dlquantObj.calibrate (imdsTrain);% SeriesNetwork创建一个工作流对象,使用FPFA比特流hW = dlhdl.Workflow (“网络”dlquantObj,“比特流”,“zcu102_int8”,“目标”,hTarget);
  4. 部署dlhdl.Workflow对你的目标对象FPGA板使用部署方法。

    %部署工作流对象hW.deploy;
  5. 当你打电话给部署方法,该方法返回:

    # # #编程的FPGA比特流使用以太……下载目标FPGA在以太网设备配置SD卡……# / tmp / hdlcoder_rd复制到/ mnt / hdlcoder_rd # hdlcoder_system拷贝比特流。位/ mnt / hdlcoder_rd #集hdlcoder_rd / hdlcoder_system比特流。位#复制Devicetree devicetree_dlhdl。dtb / mnt / hdlcoder_rd #集Devicetree hdlcoder_rd / devicetree_dlhdl。dtb #为参考设计设置引导:“AXI-Stream DDR内存访问:3-AXIM”下载目标FPGA在以太网设备配置SD卡。系统现在将重启持久更改生效。系统重启,。。# # #编程的FPGA比特流已成功完成。_________________ offset_name offset_address allocated_space _______________________ * * *“InputDataOffset”“0 x00000000”“48.0 MB”“OutputResultOffset”“0 x03000000”“4.0 MB”“SystemBufferOffset”“0 x03400000”“60.0 MB”“InstructionDataOffset”“0 x07000000”“8.0 MB”“ConvWeightDataOffset”“0 x07800000”“8.0 MB”“FCWeightDataOffset”“0 x08000000”“12.0 MB”“EndOffset”“0 x08c00000”“总:140.0 MB”# # #装载重量FC的处理器。# # # FC重量加载。 Current time is 12-Jun-2020 13:17:56

版本历史

介绍了R2020b