use matlab to prototype deep learning on a xilinx fpga video -凯发k8网页登录
fpga-based hardware is a good fit for deep learning inferencing on embedded devices because they deliver low latency and power consumption. early prototyping is essential to developing a deep learning network that can be efficiently deployed to an fpga.
see how deep learning hdl toolbox™ automates fpga prototyping of deep learning networks directly from matlab®. with a few lines of matlab code, you can deploy to and run inferencing on a xilinx® zcu102 fpga board. this direct connection allows you to run deep learning inferencing on the fpga as part of your application in matlab, so you can converge more quickly on a network that meets your system requirements.
fpgas are a good fit for deep learning inferencing in edge devices because they have lower latency, and use less power than cpus or gpus, and we’re starting to see them designed into a variety of applications.
but edge deployment brings constraints such as speed, size and power consumption, that force tradeoffs in implementing deep learning networks on fpga-based hardware. so it becomes vital for engineers to be able to quickly iterate between network design and fpga deployment.
with deep learning hdl toolbox, you can get started running inferencing on an fpga from matlab with as little as 5 lines of code added to your existing deep learning code, so you can experiment and iterate right in matlab.
to get started quickly, download the xilinx support package for deep learning hdl toolbox from the add-on explorer or the mathworks hardware support page. this package includes pre-built bitstreams that program a deep learning processor and data movement functionality onto popular boards like the xilinx zcu102.
this deep learning processor has modules that run convolution and fully connected layers, and you can compile a variety of deep learning networks to run on them without reprogramming the fpga. the rest of the functionality controls the layers, along with movement and storage of the parameters and activations, plus the interfaces that allow matlab to talk to it directly over ethernet or jtag.
this is a lane detection example that uses a series network that already been trained. it will overlay lane markings on the video.
the first line of code you will need is to define your target object. in this case, the target is a xilinx board, using the ethernet interface.
the next line defines the workflow object, which specifies to use that target object, which bitstream – and in this case it’s the one we downloaded that uses single-precision floating-point calculations, so you don’t even need to quantize to fixed-point, and of course what network we want to program onto the target.
the third line compiles the instructions that control the network and generates the parameters. as you iterate on your network design, you can just re-compile and deploy to the processor,
which is the fourth line of code here – the deploy function. this one programs the fpga with the bitstream if it hasn’t already been programmed. and it loads the compiled instructions that define the network, along with its parameters.
then finally the fifth line is the one that calls on the network to run prediction on the fpga. you’ll usually use it in your matlab algorithm like here.
and that’s it, you can try your network running on the fpga in the context of your algorithm.
here because we load one image at a time from matlab to the fpga, it appears to be running slowly, but assessing the performance profile it’s not too bad. we can make adjustments to the network right from here, recompile, and re-assess performance with just a few lines of matlab code.
so you can get immediate feedback on how it performs on an fpga without having to burden the hardware team, and ultimately you can generate hdl for a deep learning processor that you know can be implemented in hardware.
these 5 lines of matlab code are a common theme throughout our suite of examples, so you can try it with one of the examples most similar to your application.
featured product
deep learning hdl toolbox
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 mathworks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- (español)
- (english)
- (english)
欧洲
- (english)
- (english)
- (deutsch)
- (español)
- (english)
- (français)
- (english)
- (italiano)
- (english)
- (english)
- (english)
- (deutsch)
- (english)
- (english)
- switzerland
- (english)
亚太
- (english)
- (english)
- (english)
- 中国
- (日本語)
- (한국어)