09-24-2019 03:08 AM - edited 09-24-2019 03:10 AM
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?
09-24-2019 05:15 AM
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):
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.
09-24-2019 10:40 PM
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.
09-25-2019 12:45 AM
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.
09-25-2019 01:30 AM
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.
09-25-2019 02:28 AM
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.