Search code examples
pythontensorflowmachine-learningtensorflow-litegoogle-coral

If Edge TPU compiler only supports 3 dim tensors how to implement conv2d layers?


I've got a question that's hopefully simple to answer.

If I want to implement a simple conv2d layer I need a 4 dimensional weight tensor, where all dimension sizes are usually greater than 1.

But the requirements for the Edge TPU Compiler say: "Tensors are either 1-, 2-, or 3-dimensional. If a tensor has more than 3 dimensions, then only the 3 innermost dimensions may have a size greater than 1." (https://coral.withgoogle.com/docs/edgetpu/models-intro/)

Now to my question: How do I implement a conv layer if there are only three dimensional tensors with sizes greater than one available? Or am I mistaken?

Thank you in advance


Solution

  • I think they mean the input tensor and the outputs of the layers are restricted like that. The compiler certainly accepts conv2d layers, even though the kernel tensors do not satisfy those shape requirements, as you have rightfully pointed out!