MCPcopy Create free account
hub / github.com/ARM-software/armnn / IsGroupedConvolution

Function IsGroupedConvolution

delegate/common/src/DelegateUtils.hpp:333–340  ·  view source on GitHub ↗

Grouped convolution applies a separate filter over each input channel To check for a grouped convolution we can use the following calculation: numGroups = input[channels] / filter[in_channels] This gives us the number of groups to divide the input channel into. An assumption is made here that numGroups > 1 implies a grouped convolution We do not support grouped convolution, therefore we will retur

Source from the content-addressed store, hash-verified

331// An assumption is made here that numGroups > 1 implies a grouped convolution
332// We do not support grouped convolution, therefore we will return unsupported if numGroups > 1
333bool IsGroupedConvolution(armnn::TensorShape inputShape,
334 armnn::TensorShape filterShape,
335 const armnn::DataLayout dataLayout)
336{
337 const armnnUtils::DataLayoutIndexed dataLayoutIndexed(dataLayout);
338 const unsigned int channelsIndex = dataLayoutIndexed.GetChannelsIndex();
339 return inputShape[channelsIndex] / filterShape[channelsIndex] > 1;
340}
341
342// Function that takes a TensorInfo Parameter and returns the same TensorInfo with data type FLoat32.
343armnn::TensorInfo ConvertTensorInfoToFloat32(const armnn::TensorInfo& tensorInfo)

Callers 3

VisitConv2dOperatorFunction · 0.85
VisitConv2dOperatorFunction · 0.85

Calls 1

GetChannelsIndexMethod · 0.80

Tested by

no test coverage detected