ValueError: cannot reshape array of size 1600 into shape (1,10,10,0,64) #1167
arishsatheesan
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am facing this issue even after trying this manual folding configuration:
I checked a similar thread, but didn't help: #1042.
The code is:
from finn.transformation.fpgadataflow.make_zynq_proj import ZynqBuild
model = ModelWrapper("LeNet_WeightAct_dataflow_model.onnx")
fc_layers = model.get_nodes_by_op_type("MVAU_hls")
print(fc_layers)
folding = [
(6, 3, [128]), # conv1
(8, 3, [128]), # conv2
(60, 64, [128]), # fc1
(42, 30, [128]), # fc2
(5, 42, [10]), #fc3
]
for fcl, (pe, simd, ififodepth) in zip(fc_layers, folding):
fcl_inst = getCustomOp(fcl)
fcl_inst.set_nodeattr("PE", pe)
fcl_inst.set_nodeattr("SIMD", simd)
fcl_inst.set_nodeattr("inFIFODepths", ififodepth)
print(f"{fcl.name} -> PE: {pe}, SIMD: {simd}, inFIFOdepths: {ififodepth}")
swg_layers = model.get_nodes_by_op_type("ConvolutionInputGenerator_rtl")
for i in range(len(swg_layers)):
swg_inst = getCustomOp(swg_layers[i])
simd = folding[i][1]
swg_inst.set_nodeattr("SIMD", simd)
model = model.transform(GiveUniqueNodeNames())
model.save("LeNet_WeightAct_folded.onnx")
from finn.transformation.fpgadataflow.make_zynq_proj import ZynqBuild
test_pynq_board = "Pynq-Z1"
target_clk_ns = 10
model = ModelWrapper("LeNet_WeightAct_folded.onnx")
model = model.transform(ZynqBuild(platform = pynq_board, period_ns = target_clk_ns))
Could anyone please help me with this?
Beta Was this translation helpful? Give feedback.
All reactions