Add bias of convbn after downsample
Closed this issue · 0 comments
minnow54426 commented
Hello, I wonder whether bias of convbn can be added after downsample.
For example, in block0 of layer2, the convbn1 layer changes the size of image from 32 to 16. According to the code, after A and b is calculated and organized properly, they are multiplied and added before downsample. Whether I can perform the following calculation:
- Perform the 16 in and 32 out conv, which transforms the size of image from 32 to 16 with A is integrated with kernel.
- Perform downsample, then get a ciphertext which encrypt a vector of length 8192 = 32 * 256.
- Deal with b with length 32, such that its length becomes 8192 with 32 blocks and every block with 256 elements, every block's 256 elements are same and the order of blocks is same as original b, then encode dealed b and add it to the conv result, which performed A already.
I implemented this but there is something wrong with the result, Is there anything wrong?
Thanks very much.