nvdla / hw

RTL, Cmodel, and testbench for NVDLA
Other
1.68k stars 561 forks source link

Why batch normalize is implemented independently in SDP? #280

Open keqian9 opened 5 years ago

keqian9 commented 5 years ago

Hi, Does anyone known why batch normalize is implemented independently in SDP? it should be implemented with conv together.

Thanks.

silvaurus commented 5 years ago

I think it is partly because in some networks BN are defined as a separate layer. I don't think NVDLA's compiler will merge or partition layers defined in caffe model. So if the model defines BN as a separate layer, the compiler will assume so, then SDP will work in a separate mode, which means loading data from SDP_RDMA, instead of from CACC.

fanqifei commented 4 years ago

Convolution and SDP can be fused in one HW layer in NVDLA.

Erdbeerenjanzi commented 4 years ago

If you compile your network with the fast-math flag, then BN is actually combined with the CONV layer. The basic flag which is used as default seems to treat them independently.