solution for padding on binary (+1, -1) in resnet-18 #1332
Unanswered
aininot260
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
D8E7
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to create a resnet18 model with 1w1a. I use the network from https://github.com/Xilinx/brevitas/blob/dev/src/brevitas_examples/bnn_pynq/models/resnet.py
Use the following code for export
an error occured when converting:
It seems that FMPadding_Batch must accept an input of datatype contains zero, not +1, -1
When I tried to fix it by adding input quant params input_quant=Int8ActPerTensorFloat for qnn.QuantConv2d, another error occured:
It seems that I can only use +1/-1 in binary network, FMPadding and this feature made conflicts.
for convert steps, I use https://github.com/Xilinx/finn-examples/blob/feature/rn-18/build/resnet18/resnet18_custom_steps.py.
how to modify for creating an network that support padding in resnet-18?
I tried to modify the padding mode, such as set it from padding_mode='zeros' to padding_mode='circular', but it will lead to additional F.pad node in graphs, hard to convert for following steps.
Beta Was this translation helpful? Give feedback.
All reactions