MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / configure_conv_fc

Method configure_conv_fc

src/cpu/operators/CpuFullyConnected.cpp:201–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201void CpuFullyConnected::configure_conv_fc(const ITensorInfo *src,
202 const ITensorInfo *weights,
203 const ITensorInfo *biases,
204 ITensorInfo *dst,
205 const ActivationLayerInfo &act)
206{
207 ARM_COMPUTE_ERROR_ON((weights->dimension(1) != (src->dimension(0) * src->dimension(1) * src->dimension(2))));
208
209 // If the fully connected layer is called after a convolution layer, the src tensor must be linearized
210
211 // Initialize output tensor for flatten
212 auto_init_if_empty(_flattened_src, src->clone()->set_tensor_shape(compute_flatten_shape(src)));
213
214 _flatten = std::make_unique<CpuFlatten>();
215 _flatten->configure(src, &_flattened_src);
216
217 // Configure matrix multiply kernel
218 configure_mm(&_flattened_src, weights, biases, dst, act);
219}
220
221void CpuFullyConnected::configure_fc_fc(const ITensorInfo *src,
222 const ITensorInfo *weights,

Callers

nothing calls this directly

Calls 5

auto_init_if_emptyFunction · 0.85
compute_flatten_shapeFunction · 0.85
dimensionMethod · 0.45
cloneMethod · 0.45
configureMethod · 0.45

Tested by

no test coverage detected