// |------------------------------------------------------| // | If the FPGA has Uram. You can define URAM_EN parameter // | if change, Don't need update model // +------------------------------------------------------+ // | for zcu104 : `define URAM_ENABLE // +------------------------------------------------------+ // | for zcu102 : `define URAM_DISABLE // |------------------------------------------------------|
`define URAM_DISABLE
以下配置用于开启或关闭DRAM,请注意你所使用的FPGA芯片是否有支持DRAM
1 2 3 4 5 6 7 8 9 10
// |------------------------------------------------------| // | You can use DRAM if FPGA has extra LUTs // | if change, Don't need update model // +------------------------------------------------------+ // | Enable DRAM : `define DRAM_ENABLE // +------------------------------------------------------+ // | Disable DRAM : `define DRAM_DISABLE // |------------------------------------------------------|
`define DRAM_DISABLE
以下配置用于选择Block RAM的使用是高占用还是低占用
1 2 3 4 5 6 7 8 9 10
// |------------------------------------------------------| // | RAM Usage Configuration // | It relates to model. if change, must update model // +------------------------------------------------------+ // | RAM Usage High : `define RAM_USAGE_HIGH // +------------------------------------------------------+ // | RAM Usage Low : `define RAM_USAGE_LOW // |------------------------------------------------------|
// |------------------------------------------------------| // | DepthWiseConv Configuration // | It relates to model. if change, must update model // +------------------------------------------------------+ // | Enable : `define DWCV_ENABLE // +------------------------------------------------------+ // | Disable : `define DWCV_DISABLE // |------------------------------------------------------|
`define DWCV_ENABLE
ElementWise Multiply
元素点积计算两个特征图的Hadamard乘积
1 2 3 4 5 6 7 8 9 10
// |------------------------------------------------------| // | support multiplication of two feature maps // | It relates to model. if change, must update model // +------------------------------------------------------+ // | Enable : `define ELEW_MULT_ENABLE // +------------------------------------------------------+ // | Disable : `define ELEW_MULT_DISABLE // |------------------------------------------------------|
`define ELEW_MULT_DISABLE
AveragePool
该选项决定DPU是否支持平均池化,大小可选2x2、3x3到8x8
1 2 3 4 5 6 7 8 9 10
// |------------------------------------------------------| // | Pool Average Configuration // | It relates to model. if change, must update model // +------------------------------------------------------+ // | Enable : `define POOL_AVG_ENABLE // +------------------------------------------------------+ // | Disable : `define POOL_AVG_DISABLE // |------------------------------------------------------|
`define POOL_AVG_ENABLE
ReLU Type
ReLU类型决定DPU可用哪种ReLU函数,默认支持ReLU和ReLU6
以下是ReLU的配置,最多只能选择ReLU+LeakyReLU+ReLU6
1 2 3 4 5 6 7 8 9 10
// +------------------------------------------------------+ // | RELU Type Configuration // | It relates to model. if change, must update model // +------------------------------------------------------+ // | `define RELU_RELU6 // +------------------------------------------------------+ // | `define RELU_LEAKYRELU_RELU6 // |------------------------------------------------------|