ComputeLibrary icon indicating copy to clipboard operation
ComputeLibrary copied to clipboard

How to reshape a tensor?

Open Weyne168 opened this issue 9 years ago • 2 comments

hi, I configured a dnn with computeLibrary. I found that the full connected layer only accept a two dims tensor. so, I need to reshape the three(four) dims tensors to be a two dims tensor.

Is there an exiting reshape methods in this library?

Weyne168 avatar Apr 17 '17 03:04 Weyne168

Hello @Weyne168, The fully connected layer restricts only the weights to be two dimensional. If the input to your fully connected layer comes from a convolution layer the function itself will handle the reshaping. You can have a look in the codebase here. You will see that it handles the case where your input comes from a fully connected layer separately from the case where your input comes from a convolution layer. Hope this helps!

GeorgeARM avatar Apr 17 '17 12:04 GeorgeARM

Closing! Reopen if required!

GeorgeARM avatar May 03 '17 09:05 GeorgeARM