Skip to content

vivado synthesis failed of a CNN model #1025

Closed Answered by vloncar
brtsfr asked this question in Q&A
Discussion options

You must be logged in to vote

hls4ml implements CNN layers expecting a "channels last" format (also known as (N, H, W, C)) which is used by Keras/TF. PyTorch by default uses "channels first" format (or (N, C, H, W) in other terminology. These use the suffix _cf in the code and are not implemented. You can instruct hls4ml to convert to "channels last" and expect input data to be in that format (and optionally the output if needed). Check the options InputsChannelLast and TransposeOutputs of the config_from_pytorch_model. Also, you're likely using older version of hls4ml, try installing the main branch (soon to become 1.0). Mixing and matching random .h files from various forks will likely not work 😄

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
3 replies
@brtsfr
Comment options

@brtsfr
Comment options

@brtsfr
Comment options

Comment options

You must be logged in to vote
6 replies
@brtsfr
Comment options

@vloncar
Comment options

@brtsfr
Comment options

@brtsfr
Comment options

@brtsfr
Comment options

Answer selected by brtsfr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants