笔记
weixin_44970614
这个作者很懒,什么都没留下…
展开
-
可配置siz read_addr and write_addr axi4_full IP
`timescale 1ns / 1ps//////////////////////////////////////////////////////////////////////////////////// Company: // Engineer: // // Create Date: 2021/12/19 10:57:17// Design Name: // Module Name: ufo_compute_ip// Project Name: // Target Devices:原创 2021-12-28 13:50:40 · 980 阅读 · 0 评论 -
CPU_CONV2d(gemm)实现yolov4_tiny算法
def im2col(image, ksize, stride): # image is a 4d tensor([ channel,height ,width]) image_col = [] for i in range(0, image.shape[1] - ksize + 1, stride): for j in range(0, image.shape[2] - ksize + 1, stride): col = image[:, i原创 2021-06-20 16:58:37 · 177 阅读 · 0 评论 -
keras h5权重文件转为.bin文件
import numpy as npimport mathimport h5pyimport structf_read= h5py.File('L1e4_jianzhihou111.h5', 'r') #权重文件地址b1='conv2d_1/conv2d_1/bias:0' bias 地址bias_1 = "quanzhong_int16_bin/bias_1.bin" # bin存储地址bias_1 = open(bias_1 ,'wb')bb=f_read[b1] bb.原创 2021-05-30 19:41:34 · 652 阅读 · 3 评论 -
YOLO图像预处理
def letterbox_image(image, size)://size=(416,416) iw, ih = image.size w, h = size scale = min(w/iw, h/ih) nw = int(iw*scale) nh = int(ih*scale) # print(nw,nh) image = image.resize((nw,nh), Image.BICUBIC) new_image = Image.ne原创 2021-05-23 11:13:15 · 936 阅读 · 0 评论 -
FPGA(HLS)实现神经网络的 Add函数、Maxpool函数、upsample2D函数
#include"addp_upool.h"#include "string.h"Dtype_16f maxfour(Dtype_16f a,Dtype_16f b,Dtype_16f c,Dtype_16f d){ return max(max(a,b),max(c,d));}void cpy_poolbuf(Dtype_16f* In_ddr,Dtype_16f pool_bus1[Tww],INT8 Tw,int of){ memcpy(pool_bus1, (Dtype_16f *)原创 2021-05-17 14:21:17 · 360 阅读 · 0 评论 -
神经网络的Add+maxpool函数 HLS ip核设计
先定义一下四个值取最大函数#define max(a,b) ((a>b)?a:b)Dtype_16f maxfour(Dtype_16f a,Dtype_16f b,Dtype_16f c,Dtype_16f d){ return max(max(a,b),max(c,d));}这个函数就是简单的复制,封装成函数可以并行,不封装的看分析好像不并行,我也不清楚void cpy_poolbuf(Dtype_16f* In_ddr,Dtype_16f pool_bus1[Tww],INT8 T原创 2021-05-11 16:05:20 · 287 阅读 · 0 评论