UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant jbond1007
Participant
213 Views
Registered: ‎08-02-2019

DNNC input dimension error

I am trying to run a 3D convolution model for video dataset in tensorflow on ZCU104 board with DNNDK version 3.1.

After the generation of deploy model from decent, when i run dnnc_ZCU104.sh I get the following error:

[DNNC][Fatal] Check failed for condition [shape.dim_size() == 4] in [/tmp/DNNDK_Pipeline_dnnc/dnnc/dnnc_impl/parser/tf/tfparser.cc:436] :Invalid shape for input placeholder [input_1], dimension size must be 4.

3D convolution uses 5D input but the above error says only 4D input is accepted.

Does this mean 3D Convolution is not supported ? If it's not, then how can add my own implementation for it?

0 Kudos
7 Replies
207 Views
Registered: ‎07-23-2019

Re: DNNC input dimension error

You should expand the 5D tensor into 3D matrices and work them out individually

0 Kudos
Participant jbond1007
Participant
204 Views
Registered: ‎08-02-2019

Re: DNNC input dimension error

Hi,

Thanks for your reply. Could you elaborate how to do that.

0 Kudos
191 Views
Registered: ‎07-23-2019

Re: DNNC input dimension error

Sorry, I meant 5D into 4D if that is what it wants.

Not a maths teacher, neither this a maths forum, but given the n-D definition of convolution (from Matlab, to what I'm more used to):

err1.png

A bit of algebra and Human Intelligence (always necessary and good to have) will show you how to produce any n-D convolution given a function that calculates the (n-1)-D convolution. I also want things easy, nice and working out of the box.

0 Kudos
Participant jbond1007
Participant
173 Views
Registered: ‎08-02-2019

Re: DNNC input dimension error

Yes, I know how to convert 5D to 4D. I was asking what do you mean by "work them out individually"?

And also Conv3D expects 5D input.

0 Kudos
156 Views
Registered: ‎07-23-2019

Re: DNNC input dimension error

keras.layers.Conv3D  takes a 5D input and produces a 5D tensor output, where 2 of these dimensions are the batch size and the number of channels. But your original error is about a dimension 4. Is it about Conv3D or other function?

Mathematically, 3D convolution is an R3 x R3 -> R3 operation (i.e. 3D). Batches and channels are independent. If your batch size is 1 or have just one channel (b/w images) then your data is 4D or 3D, but you can always expand it with a new dimension of 1. maybe this is your problem. You provide little information to be helped and this is an FPGA forum, not about CNN.

 

 

0 Kudos
Participant jbond1007
Participant
144 Views
Registered: ‎08-02-2019

Re: DNNC input dimension error

Hi,

Thanks for your reply. I was asking it in this forum because dnnc was throwing the error and I am not sure what kind of input DNNC is expecting and I do not know whether it supports Conv3D. Anyways thank you. 

0 Kudos
128 Views
Registered: ‎07-23-2019

Re: DNNC input dimension error

Error messages are to be understood, at least partially, unless they are blatantly ambiguous (such thing not only exists but is common). I call that professional competency. No one is wise, we just know what to try next with chances of being the right thing. All these AI platforms and frameworks are new but need a strong mathematical background that most people don't have, they just buy something expensive, download some bits and play with them. A good business. 

0 Kudos