Skip to content

errors when using conv2d layers #322

@Nathan-zh

Description

@Nathan-zh

I change your network to a simple ConvNet:

model = Sequential()
model.add(Conv2D(8, 3, input_shape=(16,16,1), name='conv1', padding='same',
kernel_initializer='lecun_uniform', kernel_regularizer=l1(0.0001)))
model.add(Activation(activation='relu', name='relu1'))
model.add(Conv2D(8, 3, name='conv2', padding='same',
kernel_initializer='lecun_uniform', kernel_regularizer=l1(0.0001)))
model.add(Activation(activation='relu', name='relu2'))
model.add(Conv2D(1, 3, name='conv3', padding='same',
kernel_initializer='lecun_uniform', kernel_regularizer=l1(0.0001)))

When I execute the final command:

hls_model.build(csim=True, synth=True, cosim=True, validation=False, export=True)

An error happened as follows:

ERROR: [XFORM 203-504] Stop unrolling loop 'ConvOutHeight' (firmware/nnet_utils/nnet_conv2d.h:245) in function 'nnet::conv_2d_latency_cl<ap_fixed<16, 6, (ap_q_mode)5, (ap_o_mode)3, 0>, ap_fixed<16, 6, (ap_q_mode)5, (ap_o_mode)3, 0>, config8>' because it may cause large runtime and excessive memory usage due to increase in code size. Please avoid unrolling the loop or form sub-functions for code in the loop body.
ERROR: [HLS 200-70] Pre-synthesis failed.
command 'ap_source' returned error code
while executing
"source build_prj.tcl"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list source $arg] "

I don't know why this error happened as I only changed the network. BTW, I'm not familiar with vivado and fpga.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions