dgschwend/zynqnet

input_offset and weight offsets

Opened this issue · 1 comments

Hi David,

I'm net to both Deep Learning and HLS & trying to understand your code. In the following function,

void fpga_top(layer_t layer, data_t *SHARED_DRAM, unsigned int weights_offset, weightaddr_t num_weights, unsigned int input_offset);
what are "weights_offset" and "input_offset", used in fpga_top.hpp file?
Thank you in Advance.
Yashwant

Hi Yashwant. They are the relative memory offsets for the weights and input, with respect to the SHARED_DRAM pointer. See e.g.

data_t read = reg(SHARED_DRAM[dram_weights_offset + layer_weights_offset + addr]);
for an actual memory access...