ComputeLibrary icon indicating copy to clipboard operation
ComputeLibrary copied to clipboard

settings for "fully connected" convolution

Open joel-mi opened this issue 9 years ago • 2 comments

In order to perform "fully connected" convolution, I'm considering the following settings :

  • first 2 dimensions (width and height) of "weights" tensor : same as for input data tensor
  • first 2 dimensions (width and height) of output data tensor : both set to 1
  • in PadStrideInfo : padding set to 0 Are any additional settings required for this type of convolution ? How should "stride" be set in PadStrideInfo ? Is there any meaning to this setting anyway ?

joel-mi avatar Apr 26 '17 08:04 joel-mi

Hi @joel-mi,

for what concerns the fully connected layer, you shouldn't need the PadStrideInfo information.

The configure function for NEFullyConnectedLayer (https://github.com/ARM-software/ComputeLibrary/blob/master/arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h#L62) accepts the following arguments:

  1. Tensor: input. This input tensor can either come from a convolution layer or from another fully connected layer
  2. Tensor: weights. This input tensor stores the weights of the fully connected layer
  3. Tensor: biases. This input tensor stores the biases of the fully connected layer
  4. Tensor: Output. The output result
  5. Optional. transpose_weights. It says if the tensor for the weights must be transpose

Thanks. Gian Marco

gmiodice avatar Apr 27 '17 08:04 gmiodice

Thanks I didn't notice that there was a NEFullyConnectedLayer class, so by mistake I was trying to use NEConvolutionLayer for fully connected

joel-mi avatar Apr 27 '17 08:04 joel-mi